[U-Boot] [PATCH v3 1/3] rtc: compile date.c if DM_RTC
AKASHI Takahiro
takahiro.akashi at linaro.org
Wed Jul 11 09:06:06 UTC 2018
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 at linaro.org>
---
drivers/rtc/date.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/rtc/date.c b/drivers/rtc/date.c
index 1256ffe374..f1ac738a8a 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
--
2.17.0
More information about the U-Boot
mailing list