summaryrefslogtreecommitdiff
path: root/chip/lm4/system.c
diff options
context:
space:
mode:
authorphilipchen <philipchen@google.com>2016-06-25 15:32:11 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-06-29 21:32:00 -0700
commit0cab97574be2a2d1be35af3985425f898df6a731 (patch)
tree8fc4299642e6b6eb7ea6b55a61c55b667af04adf /chip/lm4/system.c
parentf4e2d871300f7de66a85e7f01878bf155c5f91cc (diff)
downloadchrome-ec-0cab97574be2a2d1be35af3985425f898df6a731.tar.gz
Cleanup: gate RTC console/host command behind new config options
Put RTC code supporting console/host command behind new flags 'CONFIG_CMD_RTC'/'CONFIG_HOSTCMD_RTC' BUG=chromium:613699 TEST=make buildall BRANCH=master Change-Id: Ida52265d124978f48bd6ca522be3badee9f99588 Reviewed-on: https://chromium-review.googlesource.com/356206 Commit-Ready: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'chip/lm4/system.c')
-rw-r--r--chip/lm4/system.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/chip/lm4/system.c b/chip/lm4/system.c
index 38cde27e1c..5fec905517 100644
--- a/chip/lm4/system.c
+++ b/chip/lm4/system.c
@@ -625,6 +625,7 @@ const char *system_get_chip_revision(void)
/*****************************************************************************/
/* Console commands */
+#ifdef CONFIG_CMD_RTC
static int command_system_rtc(int argc, char **argv)
{
uint32_t rtc;
@@ -686,10 +687,12 @@ DECLARE_CONSOLE_COMMAND(rtc_alarm, command_rtc_alarm_test,
"Test alarm",
NULL);
#endif /* CONFIG_CMD_RTC_ALARM */
+#endif /* CONFIG_CMD_RTC */
/*****************************************************************************/
/* Host commands */
+#ifdef CONFIG_HOSTCMD_RTC
static int system_rtc_get_value(struct host_cmd_handler_args *args)
{
struct ec_response_rtc *r = args->response;
@@ -713,3 +716,4 @@ static int system_rtc_set_value(struct host_cmd_handler_args *args)
DECLARE_HOST_COMMAND(EC_CMD_RTC_SET_VALUE,
system_rtc_set_value,
EC_VER_MASK(0));
+#endif /* CONFIG_HOSTCMD_RTC */