mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-13 03:15:06 +00:00
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=b:76232539 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>
This commit is contained in:
committed by
chrome-bot
parent
245b494e14
commit
5c611cedbf
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -18,6 +18,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
|
||||
|
||||
@@ -19,6 +19,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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user