summaryrefslogtreecommitdiff
path: root/drivers/rtc
diff options
context:
space:
mode:
authorAKASHI Takahiro <takahiro.akashi@linaro.org>2018-07-11 18:06:06 +0900
committerTom Rini <trini@konsulko.com>2018-07-24 09:25:23 -0400
commit8cffb50ab3f1a9a9f28e8f44ffc93a79c7c25ed9 (patch)
tree8fb433a7e60a4109be0251b60cc50d7234ded6d1 /drivers/rtc
parent323a73adc9a1bf2de43fe03bdd9c3038ce7c2784 (diff)
downloadu-boot-8cffb50ab3f1a9a9f28e8f44ffc93a79c7c25ed9.tar.gz
u-boot-8cffb50ab3f1a9a9f28e8f44ffc93a79c7c25ed9.tar.bz2
u-boot-8cffb50ab3f1a9a9f28e8f44ffc93a79c7c25ed9.zip
rtc: compile date.c if DM_RTC
rtc_to_tm() and rtc_mktime() are required for some RTC drivers, at least PL031. Without this patch, we also need to enable CONFIG_CMD_DATE even if we don't want or need this command. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/date.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/rtc/date.c b/drivers/rtc/date.c
index f2568cf886..c57317d2c2 100644
--- a/drivers/rtc/date.c
+++ b/drivers/rtc/date.c
@@ -9,7 +9,8 @@
#include <errno.h>
#include <rtc.h>
-#if defined(CONFIG_CMD_DATE) || defined(CONFIG_TIMESTAMP)
+#if defined(CONFIG_CMD_DATE) || defined(CONFIG_DM_RTC) || \
+ defined(CONFIG_TIMESTAMP)
#define FEBRUARY 2
#define STARTOFTIME 1970