diff options
author | Mark Hasemeyer <markhas@google.com> | 2022-11-23 09:58:21 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-11-23 21:04:59 +0000 |
commit | e04250319d222ef8505d9111ba4f03eddcaf5521 (patch) | |
tree | 861f2bc71f3cdffdb9a348f919528a569b3cd260 | |
parent | e5fc200fd3d6523d87227f9654b891ce387892ba (diff) | |
download | chrome-ec-e04250319d222ef8505d9111ba4f03eddcaf5521.tar.gz |
zephyr: Remove CONFIG_PLATFORM_EC_WATCHDOG
Remove CONFIG_PLATFORM_EC_WATCHDOG. Use Zephyr's CONFIG_WATCHDOG option
instead.
BUG=b:217926701
BRANCH=none
TEST=twister -T zephyr/test/
TEST=zmake compare-builds -a
LOW_COVERAGE_REASON=watchdog_init test not yet implemented
Signed-off-by: Mark Hasemeyer <markhas@google.com>
Change-Id: I7d5fedfc72ed886f94a94df9d3db14224bc6fb75
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4050634
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Aaron Massey <aaronmassey@google.com>
Tested-by: Mark Hasemeyer <markhas@google.com>
Commit-Queue: Mark Hasemeyer <markhas@google.com>
-rw-r--r-- | zephyr/Kconfig | 17 | ||||
-rw-r--r-- | zephyr/Kconfig.watchdog | 4 | ||||
-rw-r--r-- | zephyr/app/ec/ec_app_main.c | 2 | ||||
-rw-r--r-- | zephyr/drivers/cros_flash/cros_flash_it8xxx2.c | 4 | ||||
-rw-r--r-- | zephyr/shim/src/CMakeLists.txt | 2 | ||||
-rw-r--r-- | zephyr/test/ec_app/src/main.c | 2 |
6 files changed, 7 insertions, 24 deletions
diff --git a/zephyr/Kconfig b/zephyr/Kconfig index 9e04f4a679..b60e87d10e 100644 --- a/zephyr/Kconfig +++ b/zephyr/Kconfig @@ -741,23 +741,6 @@ config PLATFORM_EC_VSTORE_SLOT_COUNT used only for recording a hash of the read-write AP firmware for checking on resume. For this, one slot is enough. -menuconfig PLATFORM_EC_WATCHDOG - bool "Watchdog" - depends on WATCHDOG - default y - help - Enable the watchdog functionality. The watchdog timer will reboot the - system if the hook task (which is the lowest-priority task on the - system) gets starved for CPU time and isn't able to fire its - HOOK_TICK event. - - Chromium EC system uses an auxiliary timer to handle the system - warning event. This leaves some time to the system for preparing & - printing the debug information. The interval between reloads of the - watchdog timer should be less than half of the auxiliary timer - (PLATFORM_EC_WATCHDOG_PERIOD_MS - - PLATFORM_EC_WATCHDOG_WARNING_LEADING_TIME_MS). - config PLATFORM_EC_WORKAROUND_FLASH_DOWNLOAD_API bool "Workaround needed for npcx9 ES1 chip" depends on SOC_SERIES_NPCX9 diff --git a/zephyr/Kconfig.watchdog b/zephyr/Kconfig.watchdog index f6c9002233..653cc58e22 100644 --- a/zephyr/Kconfig.watchdog +++ b/zephyr/Kconfig.watchdog @@ -2,7 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -if PLATFORM_EC_WATCHDOG +if WATCHDOG config PLATFORM_EC_WATCHDOG_PERIOD_MS int "Watchdog timeout in ms" @@ -27,4 +27,4 @@ config PLATFORM_EC_WATCHDOG_WARNING_LEADING_TIME_MS For the ITE chip, use CONFIG_WDT_ITE_WARNING_LEADING_TIME_MS instead of this config. -endif # PLATFORM_EC_WATCHDOG +endif # WATCHDOG diff --git a/zephyr/app/ec/ec_app_main.c b/zephyr/app/ec/ec_app_main.c index 4ab5fd3a44..961e4f5ce2 100644 --- a/zephyr/app/ec/ec_app_main.c +++ b/zephyr/app/ec/ec_app_main.c @@ -37,7 +37,7 @@ void ec_app_main(void) system_print_banner(); - if (IS_ENABLED(CONFIG_PLATFORM_EC_WATCHDOG) && + if (IS_ENABLED(CONFIG_WATCHDOG) && !IS_ENABLED(CONFIG_WDT_DISABLE_AT_BOOT)) { watchdog_init(); } diff --git a/zephyr/drivers/cros_flash/cros_flash_it8xxx2.c b/zephyr/drivers/cros_flash/cros_flash_it8xxx2.c index 79ef0c36b2..2d34a21523 100644 --- a/zephyr/drivers/cros_flash/cros_flash_it8xxx2.c +++ b/zephyr/drivers/cros_flash/cros_flash_it8xxx2.c @@ -180,7 +180,7 @@ static int cros_flash_it8xxx2_write(const struct device *dev, int offset, * chance to go back to hook task to touch watchdog. Reload watchdog * on each flash write to prevent the reset. */ - if (IS_ENABLED(CONFIG_PLATFORM_EC_WATCHDOG)) + if (IS_ENABLED(CONFIG_WATCHDOG)) watchdog_reload(); return flash_write(flash_controller, offset, src_data, size); @@ -223,7 +223,7 @@ static int cros_flash_it8xxx2_erase(const struct device *dev, int offset, * If requested erase size is too large at one time on KGD * flash, we need to reload watchdog to prevent the reset. */ - if (IS_ENABLED(CONFIG_PLATFORM_EC_WATCHDOG) && (size > 0x10000)) + if (IS_ENABLED(CONFIG_WATCHDOG) && (size > 0x10000)) watchdog_reload(); } /* Restore interrupts */ diff --git a/zephyr/shim/src/CMakeLists.txt b/zephyr/shim/src/CMakeLists.txt index 543c2b2303..62697db096 100644 --- a/zephyr/shim/src/CMakeLists.txt +++ b/zephyr/shim/src/CMakeLists.txt @@ -63,7 +63,7 @@ zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_TEMP_SENSOR temp_sensors.c zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_TIMER hwtimer.c) zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_I2C i2c.c) zephyr_library_sources_ifdef(CONFIG_SHIMMED_TASKS tasks.c) -zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_WATCHDOG watchdog.c) +zephyr_library_sources_ifdef(CONFIG_WATCHDOG watchdog.c) zephyr_library_sources_ifndef(CONFIG_PLATFORM_EC_BC12_SINGLE_DRIVER bc12.c) zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_BC12_DETECT_PI3USB9201 diff --git a/zephyr/test/ec_app/src/main.c b/zephyr/test/ec_app/src/main.c index 3c317d2a08..52a19f131c 100644 --- a/zephyr/test/ec_app/src/main.c +++ b/zephyr/test/ec_app/src/main.c @@ -46,7 +46,7 @@ ZTEST(ec_app_tests, test_setup_espi) } #endif -#ifdef CONFIG_PLATFORM_EC_WATCHDOG +#ifdef CONFIG_WATCHDOG ZTEST(ec_app_tests, test_watchdog_init) { zassert_unreachable("TODO: Implement this test."); |