diff options
-rw-r--r-- | baseboard/kalista/baseboard.c | 8 | ||||
-rw-r--r-- | baseboard/octopus/baseboard.c | 7 | ||||
-rw-r--r-- | baseboard/volteer/baseboard.h | 1 | ||||
-rw-r--r-- | board/chell/board.c | 8 | ||||
-rw-r--r-- | board/fizz/board.c | 8 | ||||
-rw-r--r-- | board/nocturne/board.c | 8 | ||||
-rw-r--r-- | board/nocturne/board.h | 1 | ||||
-rw-r--r-- | board/volteer/board.h | 1 | ||||
-rw-r--r-- | board/volteer/gpio.inc | 2 | ||||
-rw-r--r-- | power/intel_x86.c | 10 | ||||
-rw-r--r-- | power/intel_x86.h | 5 |
11 files changed, 13 insertions, 46 deletions
diff --git a/baseboard/kalista/baseboard.c b/baseboard/kalista/baseboard.c index b7caafb4ad..c3c2fa4970 100644 --- a/baseboard/kalista/baseboard.c +++ b/baseboard/kalista/baseboard.c @@ -520,11 +520,3 @@ int fan_percent_to_rpm(int fan, int pct) return fan_table[current_level].rpm; } - -void board_rtc_reset(void) -{ - CPRINTS("Asserting RTCRST# to PCH"); - gpio_set_level(GPIO_PCH_RTCRST, 1); - udelay(100); - gpio_set_level(GPIO_PCH_RTCRST, 0); -} diff --git a/baseboard/octopus/baseboard.c b/baseboard/octopus/baseboard.c index 929bf77139..9bf8347756 100644 --- a/baseboard/octopus/baseboard.c +++ b/baseboard/octopus/baseboard.c @@ -220,13 +220,6 @@ void baseboard_tcpc_init(void) /* Called after the cbi_init (via +2) */ DECLARE_HOOK(HOOK_INIT, baseboard_tcpc_init, HOOK_PRIO_INIT_I2C + 2); -void board_rtc_reset(void) -{ - gpio_set_level(GPIO_PCH_RTCRST, 1); - udelay(100); - gpio_set_level(GPIO_PCH_RTCRST, 0); -} - int board_set_active_charge_port(int port) { int is_valid_port = (port >= 0 && diff --git a/baseboard/volteer/baseboard.h b/baseboard/volteer/baseboard.h index 1d2744a05d..f7a6f6793c 100644 --- a/baseboard/volteer/baseboard.h +++ b/baseboard/volteer/baseboard.h @@ -40,6 +40,7 @@ #define CONFIG_POWER_S0IX #define CONFIG_POWER_S0IX_FAILURE_DETECTION #define CONFIG_POWER_TRACK_HOST_SLEEP_STATE +#define CONFIG_BOARD_HAS_RTC_RESET /* Common Keyboard Defines */ diff --git a/board/chell/board.c b/board/chell/board.c index 2dcd5328b3..64e4e13b5f 100644 --- a/board/chell/board.c +++ b/board/chell/board.c @@ -204,14 +204,6 @@ void board_reset_pd_mcu(void) gpio_set_level(GPIO_PD_RST_L, 1); } -void board_rtc_reset(void) -{ - CPRINTS("Asserting RTCRST# to PCH"); - gpio_set_level(GPIO_PCH_RTCRST, 1); - udelay(100); - gpio_set_level(GPIO_PCH_RTCRST, 0); -} - const struct temp_sensor_t temp_sensors[] = { {"Battery", TEMP_SENSOR_TYPE_BATTERY, charge_get_battery_temp, 0, 4}, diff --git a/board/fizz/board.c b/board/fizz/board.c index dbb898c69b..6d3d3378d2 100644 --- a/board/fizz/board.c +++ b/board/fizz/board.c @@ -823,11 +823,3 @@ int fan_percent_to_rpm(int fan, int pct) return fan_table[current_level].rpm; } - -void board_rtc_reset(void) -{ - CPRINTS("Asserting RTCRST# to PCH"); - gpio_set_level(GPIO_PCH_RTCRST, 1); - udelay(100); - gpio_set_level(GPIO_PCH_RTCRST, 0); -} diff --git a/board/nocturne/board.c b/board/nocturne/board.c index 16a30571d4..eac0b14b27 100644 --- a/board/nocturne/board.c +++ b/board/nocturne/board.c @@ -685,14 +685,6 @@ void board_set_tcpc_power_mode(int port, int mode) board_reset_pd_mcu(); } -void board_rtc_reset(void) -{ - cprints(CC_SYSTEM, "Asserting RTCRST# to PCH"); - gpio_set_level(GPIO_EC_PCH_RTCRST, 1); - udelay(100); - gpio_set_level(GPIO_EC_PCH_RTCRST, 0); -} - int board_set_active_charge_port(int port) { int is_real_port = (port >= 0 && diff --git a/board/nocturne/board.h b/board/nocturne/board.h index 24768bf7c4..b836fbdf99 100644 --- a/board/nocturne/board.h +++ b/board/nocturne/board.h @@ -190,6 +190,7 @@ #define GPIO_ENTERING_RW GPIO_EC_ENTERING_RW #define GPIO_PCH_PWRBTN_L GPIO_EC_PCH_PWR_BTN_L #define GPIO_PCH_RSMRST_L GPIO_RSMRST_L +#define GPIO_PCH_RTCRST GPIO_EC_PCH_RTCRST #define GPIO_PCH_SLP_S0_L GPIO_SLP_S0_L #define GPIO_PCH_SLP_S3_L GPIO_SLP_S3_L #define GPIO_PCH_SLP_S4_L GPIO_SLP_S4_L diff --git a/board/volteer/board.h b/board/volteer/board.h index 92fbdb3105..81b5d63c58 100644 --- a/board/volteer/board.h +++ b/board/volteer/board.h @@ -48,6 +48,7 @@ #define GPIO_LID_OPEN GPIO_EC_LID_OPEN #define GPIO_PCH_WAKE_L GPIO_EC_PCH_WAKE_ODL #define GPIO_PCH_PWRBTN_L GPIO_EC_PCH_PWR_BTN_ODL +#define GPIO_PCH_RTCRST GPIO_EC_PCH_RTCRST #define GPIO_POWER_BUTTON_L GPIO_H1_EC_PWR_BTN_ODL #define GPIO_CPU_PROCHOT GPIO_EC_PROCHOT_ODL #define GPIO_SYS_RESET_L GPIO_SYS_RST_ODL diff --git a/board/volteer/gpio.inc b/board/volteer/gpio.inc index 604431ca98..4ad153ef9f 100644 --- a/board/volteer/gpio.inc +++ b/board/volteer/gpio.inc @@ -35,7 +35,7 @@ GPIO(EC_RST_ODL, PIN(0, 2), GPIO_INT_BOTH | GPIO_HIB_WAKE_HIGH) GPIO(EC_PCH_SYS_PWROK, PIN(3, 7), GPIO_OUT_LOW) /* TODO - b/140556273 - implement support with power sequencing */ GPIO(EC_PCH_RSMRST_ODL, PIN(A, 6), GPIO_ODR_HIGH) /* TODO - b/140950085 - implement TGL sequencing requirement */ GPIO(EC_PCH_PWR_BTN_ODL, PIN(C, 1), GPIO_ODR_HIGH) -GPIO(EC_PCH_RTCRST, PIN(7, 6), GPIO_OUT_LOW) /* TODO - b/141321096 - implement reset logic for RTC */ +GPIO(EC_PCH_RTCRST, PIN(7, 6), GPIO_OUT_LOW) GPIO(EC_PCH_WAKE_ODL, PIN(7, 4), GPIO_ODR_HIGH) GPIO(EC_ENTERING_RW, PIN(E, 3), GPIO_OUT_LOW) GPIO(EC_PROCHOT_ODL, PIN(6, 3), GPIO_ODR_HIGH) diff --git a/power/intel_x86.c b/power/intel_x86.c index ace891c8b9..c60c1f94e3 100644 --- a/power/intel_x86.c +++ b/power/intel_x86.c @@ -87,6 +87,14 @@ static inline int chipset_get_sleep_signal(enum sys_sleep_state state) } #ifdef CONFIG_BOARD_HAS_RTC_RESET +static void intel_x86_rtc_reset(void) +{ + CPRINTS("Asserting RTCRST# to PCH"); + gpio_set_level(GPIO_PCH_RTCRST, 1); + udelay(100); + gpio_set_level(GPIO_PCH_RTCRST, 0); +} + static enum power_state power_wait_s5_rtc_reset(void) { static int s5_exit_tries; @@ -100,7 +108,7 @@ static enum power_state power_wait_s5_rtc_reset(void) chipset_force_g3(); /* Assert RTCRST# and retry 5 times */ - board_rtc_reset(); + intel_x86_rtc_reset(); if (++s5_exit_tries > 4) { s5_exit_tries = 0; diff --git a/power/intel_x86.h b/power/intel_x86.h index f6f5f311b8..ef71bf5a75 100644 --- a/power/intel_x86.h +++ b/power/intel_x86.h @@ -57,9 +57,4 @@ enum power_state chipset_force_g3(void); */ enum power_state common_intel_x86_power_handle_state(enum power_state state); -/** - * Reset RTC - */ -void board_rtc_reset(void); - #endif /* __CROS_EC_INTEL_X86_H */ |