From 2ea0707aed5b740421956cc9fdf197e1e3d9aecd Mon Sep 17 00:00:00 2001 From: Yuval Peress Date: Tue, 6 Apr 2021 13:09:12 -0600 Subject: zephyr: kconfig: move rtc configs to separate file Clean up the root Kconfig for Zephyr by moving sub configs to separate file (Kconfig.rtc). BRANCH=none BUG=none TEST=zmake testall Change-Id: I6d9879dd293f944b3029ed1100fc4e406ae8f82c Signed-off-by: Yuval Peress Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2808150 Reviewed-by: Simon Glass --- zephyr/Kconfig | 38 +------------------------------------- zephyr/Kconfig.rtc | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 37 deletions(-) create mode 100644 zephyr/Kconfig.rtc (limited to 'zephyr') diff --git a/zephyr/Kconfig b/zephyr/Kconfig index 63f1ff6125..2aff7bab6f 100644 --- a/zephyr/Kconfig +++ b/zephyr/Kconfig @@ -47,6 +47,7 @@ rsource "Kconfig.panic" rsource "Kconfig.powerseq" rsource "Kconfig.mkbp_event" rsource "Kconfig.motionsense" +rsource "Kconfig.rtc" rsource "Kconfig.stacks" rsource "Kconfig.system" rsource "Kconfig.tasks" @@ -406,43 +407,6 @@ config PLATFORM_EC_RTC to the outside world and can often obtain the current time when desired. -if PLATFORM_EC_RTC - -config PLATFORM_EC_CONSOLE_CMD_RTC - bool "Console command: rtc" - help - This command allows getting and setting the current RTC value. The - value is in seconds since the Epoch (midnight on 1/1/70). You can - convert this to a human date on the command line with 'date -u -d @n' - where n is the numeric value. To convert a time to seconds, use: - - date -d '1970-01-01 UTC + n seconds' - -config PLATFORM_EC_CONSOLE_CMD_RTC_ALARM - bool "Console command: rtc_alarm" - depends on PLATFORM_EC_CONSOLE_CMD_RTC - help - This command supports setting a real-time-clock (RTC) alarm that - causes an interrupt when the timer reaches that point. To set the - alarm: - - rtc [] - - where: - is the number of seconds since the epoch - is the optional number of microseconds (fractional seconds) - -config PLATFORM_EC_HOSTCMD_RTC - bool "Host command: EC_CMD_RTC_GET_VALUE etc." - depends on PLATFORM_EC_HOSTCMD - help - Enables support for EC_CMD_RTC_GET_VALUE, EC_CMD_RTC_SET_VALUE, - EC_CMD_RTC_GET_ALARM and EC_CMD_RTC_SET_ALARM which colectively allow - the AP to control the EC's real-time-clock. The AP typically makes - use of the EC's RTC to avoid needing a discrete RTC chip on the board. - -endif # PLATFORM_EC_RTC - choice "SHA256 method" prompt "Select method to use for computing SHA256 hashes" help diff --git a/zephyr/Kconfig.rtc b/zephyr/Kconfig.rtc new file mode 100644 index 0000000000..5f36893122 --- /dev/null +++ b/zephyr/Kconfig.rtc @@ -0,0 +1,40 @@ +# Copyright 2021 The Chromium OS Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +if PLATFORM_EC_RTC + +config PLATFORM_EC_CONSOLE_CMD_RTC + bool "Console command: rtc" + help + This command allows getting and setting the current RTC value. The + value is in seconds since the Epoch (midnight on 1/1/70). You can + convert this to a human date on the command line with 'date -u -d @n' + where n is the numeric value. To convert a time to seconds, use: + + date -d '1970-01-01 UTC + n seconds' + +config PLATFORM_EC_CONSOLE_CMD_RTC_ALARM + bool "Console command: rtc_alarm" + depends on PLATFORM_EC_CONSOLE_CMD_RTC + help + This command supports setting a real-time-clock (RTC) alarm that + causes an interrupt when the timer reaches that point. To set the + alarm: + + rtc [] + + where: + is the number of seconds since the epoch + is the optional number of microseconds (fractional seconds) + +config PLATFORM_EC_HOSTCMD_RTC + bool "Host command: EC_CMD_RTC_GET_VALUE etc." + depends on PLATFORM_EC_HOSTCMD + help + Enables support for EC_CMD_RTC_GET_VALUE, EC_CMD_RTC_SET_VALUE, + EC_CMD_RTC_GET_ALARM and EC_CMD_RTC_SET_ALARM which colectively allow + the AP to control the EC's real-time-clock. The AP typically makes + use of the EC's RTC to avoid needing a discrete RTC chip on the board. + +endif # PLATFORM_EC_RTC -- cgit v1.2.1