Commit 8cffb50ab3f1a9a9f28e8f44ffc93a79c7c25ed9

Authored by AKASHI Takahiro
Committed by Tom Rini
1 parent 323a73adc9

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>

Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff

... ... @@ -9,7 +9,8 @@
9 9 #include <errno.h>
10 10 #include <rtc.h>
11 11  
12   -#if defined(CONFIG_CMD_DATE) || defined(CONFIG_TIMESTAMP)
  12 +#if defined(CONFIG_CMD_DATE) || defined(CONFIG_DM_RTC) || \
  13 + defined(CONFIG_TIMESTAMP)
13 14  
14 15 #define FEBRUARY 2
15 16 #define STARTOFTIME 1970