diff options
author | Duncan Laurie <dlaurie@google.com> | 2018-03-23 22:36:35 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2018-03-27 18:22:48 +0000 |
commit | a659997e479755e7a9d0a723dbb24c5d19be41b4 (patch) | |
tree | 1d90c13e95b4d47ca7470d6475fb648214380794 | |
parent | d22019b1d4c2d82f6cd4aaa17f88ba68ee1698d7 (diff) | |
download | chrome-ec-a659997e479755e7a9d0a723dbb24c5d19be41b4.tar.gz |
Add config for boards that cannot distinguish reset type
We have a growing list of boards in chip/npcx/system.c that are
unable to distinguish a reset from a power-on or a reset-pin type.
Instead of being a temporary issue this is now solidified in the
design on some kabylake boards.
Instead of defining board-specific checks in the chip code this
change adds a config option that the relevant boards can define.
BUG=none
BRANCH=none
TEST=make -j buildall passes
Change-Id: I76e0f011d70ce6f778b1fb6a56c2779c39c3cbd6
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://chromium-review.googlesource.com/979575
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/982340
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Trybot-Ready: Furquan Shaikh <furquan@chromium.org>
-rw-r--r-- | board/eve/board.h | 1 | ||||
-rw-r--r-- | board/nami/board.h | 1 | ||||
-rw-r--r-- | board/nautilus/board.h | 1 | ||||
-rw-r--r-- | board/poppy/board.h | 1 | ||||
-rw-r--r-- | board/wheatley/board.h | 1 | ||||
-rw-r--r-- | chip/npcx/system.c | 6 | ||||
-rw-r--r-- | include/config.h | 6 |
7 files changed, 13 insertions, 4 deletions
diff --git a/board/eve/board.h b/board/eve/board.h index 2f843e96c2..b159e8a3e1 100644 --- a/board/eve/board.h +++ b/board/eve/board.h @@ -27,6 +27,7 @@ #define CONFIG_BACKLIGHT_LID #define CONFIG_BOARD_VERSION #define CONFIG_BOARD_SPECIFIC_VERSION +#define CONFIG_BOARD_FORCE_RESET_PIN #define CONFIG_DEVICE_EVENT #define CONFIG_DPTF #define CONFIG_DPTF_DEVICE_ORIENTATION diff --git a/board/nami/board.h b/board/nami/board.h index 6fa886f119..620fb9f936 100644 --- a/board/nami/board.h +++ b/board/nami/board.h @@ -20,6 +20,7 @@ #define CONFIG_BACKLIGHT_LID_ACTIVE_LOW #define CONFIG_BOARD_VERSION #define CONFIG_BOARD_SPECIFIC_VERSION +#define CONFIG_BOARD_FORCE_RESET_PIN #define CONFIG_CRC8 #define CONFIG_CROS_BOARD_INFO #define CONFIG_CASE_CLOSED_DEBUG_EXTERNAL diff --git a/board/nautilus/board.h b/board/nautilus/board.h index 26e5aa21f0..997ebfbb0f 100644 --- a/board/nautilus/board.h +++ b/board/nautilus/board.h @@ -12,6 +12,7 @@ #define CONFIG_ADC #define CONFIG_BACKLIGHT_LID #define CONFIG_BOARD_VERSION +#define CONFIG_BOARD_FORCE_RESET_PIN #define CONFIG_CASE_CLOSED_DEBUG_EXTERNAL #define CONFIG_DPTF #define CONFIG_DPTF_DEVICE_ORIENTATION diff --git a/board/poppy/board.h b/board/poppy/board.h index 8176099e24..bcce09b1f2 100644 --- a/board/poppy/board.h +++ b/board/poppy/board.h @@ -13,6 +13,7 @@ #define CONFIG_BACKLIGHT_LID #define CONFIG_BOARD_VERSION #define CONFIG_BOARD_SPECIFIC_VERSION +#define CONFIG_BOARD_FORCE_RESET_PIN #define CONFIG_BUTTON_TRIGGERED_RECOVERY #define CONFIG_DPTF #define CONFIG_DPTF_DEVICE_ORIENTATION diff --git a/board/wheatley/board.h b/board/wheatley/board.h index dcd773f827..dd741c0fbc 100644 --- a/board/wheatley/board.h +++ b/board/wheatley/board.h @@ -18,6 +18,7 @@ #define CONFIG_BATTERY_SMART #define CONFIG_BOARD_VERSION #define CONFIG_CHARGE_MANAGER +#define CONFIG_BOARD_FORCE_RESET_PIN #define CONFIG_CHARGER #define CONFIG_CHARGER_V2 diff --git a/chip/npcx/system.c b/chip/npcx/system.c index 649ec25a89..b38b09aaf1 100644 --- a/chip/npcx/system.c +++ b/chip/npcx/system.c @@ -367,10 +367,8 @@ void system_check_reset_cause(void) /* Use scratch bit to check power on reset or VCC1_RST reset */ if (!IS_BIT_SET(NPCX_RSTCTL, NPCX_RSTCTL_VCC1_RST_SCRATCH)) { -#if defined(BOARD_WHEATLEY) || defined(BOARD_EVE) || defined(BOARD_POPPY) || defined(BOARD_SORAKA)\ - || defined(BOARD_NAUTILUS) || defined(BOARD_NAMI) - - /* TODO(crosbug.com/p/61028): Remove workaround for Eve */ +#ifdef CONFIG_BOARD_FORCE_RESET_PIN + /* Treat all resets as RESET_PIN */ flags |= RESET_FLAG_RESET_PIN; #else /* Check for VCC1 reset */ diff --git a/include/config.h b/include/config.h index c163ee5bb5..f96103a4af 100644 --- a/include/config.h +++ b/include/config.h @@ -420,6 +420,12 @@ /* EC responses to a board defined I2C slave address */ #undef CONFIG_BOARD_I2C_SLAVE_ADDR +/* + * The board is unable to distinguish EC reset from power-on so it should treat + * all resets as triggered by RESET_PIN even if it is a POWER_ON reset. + */ +#undef CONFIG_BOARD_FORCE_RESET_PIN + /* Permanent LM4 boot configuration */ #undef CONFIG_BOOTCFG_VALUE |