diff options
Diffstat (limited to 'board')
-rw-r--r-- | board/chell/board.c | 6 | ||||
-rw-r--r-- | board/cr50/ap_state.c | 3 | ||||
-rw-r--r-- | board/cr50/board.c | 6 | ||||
-rw-r--r-- | board/cr50/factory_mode.c | 3 | ||||
-rw-r--r-- | board/cr50/wp.c | 3 | ||||
-rw-r--r-- | board/glados/board.c | 6 | ||||
-rw-r--r-- | board/jacuzzi/board.c | 2 | ||||
-rw-r--r-- | board/kodama/board.c | 2 | ||||
-rw-r--r-- | board/kukui/board.c | 2 | ||||
-rw-r--r-- | board/mchpevb1/board.c | 6 | ||||
-rw-r--r-- | board/plankton/board.c | 2 |
11 files changed, 22 insertions, 19 deletions
diff --git a/board/chell/board.c b/board/chell/board.c index 48e71a6366..2dcd5328b3 100644 --- a/board/chell/board.c +++ b/board/chell/board.c @@ -411,7 +411,7 @@ void board_hibernate(void) /* Make the pmic re-sequence the power rails under these conditions. */ #define PMIC_RESET_FLAGS \ - (RESET_FLAG_WATCHDOG | RESET_FLAG_SOFT | RESET_FLAG_HARD) + (EC_RESET_FLAG_WATCHDOG | EC_RESET_FLAG_SOFT | EC_RESET_FLAG_HARD) static void board_handle_reboot(void) { int flags; @@ -426,8 +426,8 @@ static void board_handle_reboot(void) return; /* Preserve AP off request. */ - if (flags & RESET_FLAG_AP_OFF) - chip_save_reset_flags(RESET_FLAG_AP_OFF); + if (flags & EC_RESET_FLAG_AP_OFF) + chip_save_reset_flags(EC_RESET_FLAG_AP_OFF); ccprintf("Restarting system with PMIC.\n"); /* Flush console */ diff --git a/board/cr50/ap_state.c b/board/cr50/ap_state.c index cf30e4a85c..1224818f5b 100644 --- a/board/cr50/ap_state.c +++ b/board/cr50/ap_state.c @@ -4,6 +4,7 @@ * * AP state machine */ +#include "ec_commands.h" #include "gpio.h" #include "hooks.h" #include "registers.h" @@ -173,7 +174,7 @@ static void init_ap_detect(void) * complete. */ if (board_uses_closed_loop_reset() && - !(system_get_reset_flags() & RESET_FLAG_HIBERNATE)) { + !(system_get_reset_flags() & EC_RESET_FLAG_HIBERNATE)) { board_closed_loop_reset(); } else { /* diff --git a/board/cr50/board.c b/board/cr50/board.c index eb7e2cb3d6..9ec4edcbd6 100644 --- a/board/cr50/board.c +++ b/board/cr50/board.c @@ -712,7 +712,7 @@ static void board_init(void) * Deep sleep resets should be considered valid and should not impact * the rolling reboot count. */ - if (system_get_reset_flags() & RESET_FLAG_HIBERNATE) + if (system_get_reset_flags() & EC_RESET_FLAG_HIBERNATE) system_decrement_retry_counter(); configure_board_specific_gpios(); init_pmu(); @@ -728,7 +728,7 @@ static void board_init(void) * If this was a low power wake and not a rollback, restore the ccd * state from the long-life register. */ - if ((system_get_reset_flags() & RESET_FLAG_HIBERNATE) && + if ((system_get_reset_flags() & EC_RESET_FLAG_HIBERNATE) && !system_rollback_detected()) { ccd_init_state = (GREG32(PMU, LONG_LIFE_SCRATCH1) & BOARD_CCD_STATE) >> BOARD_CCD_SHIFT; @@ -1412,7 +1412,7 @@ static void init_board_properties(void) * update from a version not setting the register. */ if (!(properties & BOARD_ALL_PROPERTIES) || (system_get_reset_flags() & - RESET_FLAG_HARD)) { + EC_RESET_FLAG_HARD)) { /* * Mask board properties because following hard reset, they * won't be cleared. diff --git a/board/cr50/factory_mode.c b/board/cr50/factory_mode.c index a645fd5aed..520105c241 100644 --- a/board/cr50/factory_mode.c +++ b/board/cr50/factory_mode.c @@ -6,6 +6,7 @@ #include "board_id.h" #include "console.h" #include "ccd_config.h" +#include "ec_commands.h" #include "extension.h" #include "system.h" @@ -73,7 +74,7 @@ static int inactive_image_is_guc_image(void) */ int board_is_first_factory_boot(void) { - return (!(system_get_reset_flags() & RESET_FLAG_HIBERNATE) && + return (!(system_get_reset_flags() & EC_RESET_FLAG_HIBERNATE) && inactive_image_is_guc_image() && board_id_is_erased()); } diff --git a/board/cr50/wp.c b/board/cr50/wp.c index c90615b349..f14608faa3 100644 --- a/board/cr50/wp.c +++ b/board/cr50/wp.c @@ -6,6 +6,7 @@ #include "ccd_config.h" #include "console.h" #include "crc8.h" +#include "ec_commands.h" #include "extension.h" #include "flash_log.h" #include "gpio.h" @@ -281,7 +282,7 @@ void init_wp_state(void) set_bp_follow_ccd_config(); /* Check system reset flags after CCD config is initially loaded */ - if ((system_get_reset_flags() & RESET_FLAG_HIBERNATE) && + if ((system_get_reset_flags() & EC_RESET_FLAG_HIBERNATE) && !system_rollback_detected()) { /* * Deep sleep resume without rollback, so reload the WP state diff --git a/board/glados/board.c b/board/glados/board.c index 1b1ac7ebcc..5dabd57c7e 100644 --- a/board/glados/board.c +++ b/board/glados/board.c @@ -401,7 +401,7 @@ void board_hibernate_late(void) #define BOARD_MIN_ID_LOD_EN 2 /* Make the pmic re-sequence the power rails under these conditions. */ #define PMIC_RESET_FLAGS \ - (RESET_FLAG_WATCHDOG | RESET_FLAG_SOFT | RESET_FLAG_HARD) + (EC_RESET_FLAG_WATCHDOG | EC_RESET_FLAG_SOFT | EC_RESET_FLAG_HARD) static void board_handle_reboot(void) { int flags; @@ -419,8 +419,8 @@ static void board_handle_reboot(void) return; /* Preserve AP off request. */ - if (flags & RESET_FLAG_AP_OFF) - chip_save_reset_flags(RESET_FLAG_AP_OFF); + if (flags & EC_RESET_FLAG_AP_OFF) + chip_save_reset_flags(EC_RESET_FLAG_AP_OFF); ccprintf("Restarting system with PMIC.\n"); /* Flush console */ diff --git a/board/jacuzzi/board.c b/board/jacuzzi/board.c index 0e8200754e..6d6f722168 100644 --- a/board/jacuzzi/board.c +++ b/board/jacuzzi/board.c @@ -219,7 +219,7 @@ int pd_snk_is_vbus_provided(int port) static void board_init(void) { /* If the reset cause is external, pulse PMIC force reset. */ - if (system_get_reset_flags() == RESET_FLAG_RESET_PIN) { + if (system_get_reset_flags() == EC_RESET_FLAG_RESET_PIN) { gpio_set_level(GPIO_PMIC_FORCE_RESET_ODL, 0); msleep(100); gpio_set_level(GPIO_PMIC_FORCE_RESET_ODL, 1); diff --git a/board/kodama/board.c b/board/kodama/board.c index 54a2ffd9a9..1e778410cb 100644 --- a/board/kodama/board.c +++ b/board/kodama/board.c @@ -196,7 +196,7 @@ int pd_snk_is_vbus_provided(int port) static void board_init(void) { /* If the reset cause is external, pulse PMIC force reset. */ - if (system_get_reset_flags() == RESET_FLAG_RESET_PIN) { + if (system_get_reset_flags() == EC_RESET_FLAG_RESET_PIN) { gpio_set_level(GPIO_PMIC_FORCE_RESET_ODL, 0); msleep(100); gpio_set_level(GPIO_PMIC_FORCE_RESET_ODL, 1); diff --git a/board/kukui/board.c b/board/kukui/board.c index 8f54d78f3b..3eb28bb4c7 100644 --- a/board/kukui/board.c +++ b/board/kukui/board.c @@ -226,7 +226,7 @@ void pogo_adc_interrupt(enum gpio_signal signal) static void board_init(void) { /* If the reset cause is external, pulse PMIC force reset. */ - if (system_get_reset_flags() == RESET_FLAG_RESET_PIN) { + if (system_get_reset_flags() == EC_RESET_FLAG_RESET_PIN) { gpio_set_level(GPIO_PMIC_FORCE_RESET_ODL, 0); msleep(100); gpio_set_level(GPIO_PMIC_FORCE_RESET_ODL, 1); diff --git a/board/mchpevb1/board.c b/board/mchpevb1/board.c index 9056f904dd..169a059a15 100644 --- a/board/mchpevb1/board.c +++ b/board/mchpevb1/board.c @@ -769,7 +769,7 @@ void board_hibernate_late(void) #define BOARD_MIN_ID_LOD_EN 2 /* Make the pmic re-sequence the power rails under these conditions. */ #define PMIC_RESET_FLAGS \ - (RESET_FLAG_WATCHDOG | RESET_FLAG_SOFT | RESET_FLAG_HARD) + (EC_RESET_FLAG_WATCHDOG | EC_RESET_FLAG_SOFT | EC_RESET_FLAG_HARD) static void board_handle_reboot(void) { #if 0 /* MEC17xx EVB + SKL-RVP3 does not use chromebook PMIC design */ @@ -792,8 +792,8 @@ static void board_handle_reboot(void) return; /* Preserve AP off request. */ - if (flags & RESET_FLAG_AP_OFF) - chip_save_reset_flags(RESET_FLAG_AP_OFF); + if (flags & EC_RESET_FLAG_AP_OFF) + chip_save_reset_flags(EC_RESET_FLAG_AP_OFF); ccprintf("Restarting system with PMIC.\n"); /* Flush console */ diff --git a/board/plankton/board.c b/board/plankton/board.c index dbb3ff62b2..3f8e718f0e 100644 --- a/board/plankton/board.c +++ b/board/plankton/board.c @@ -741,7 +741,7 @@ static void board_init(void) sn75dp130_redriver_init(); /* Initialize USB hub */ - if (system_get_reset_flags() & RESET_FLAG_POWER_ON) + if (system_get_reset_flags() & EC_RESET_FLAG_POWER_ON) hook_call_deferred(&board_usb_hub_reset_no_return_data, 500 * MSEC); |