diff options
-rw-r--r-- | board/bip/board.c | 5 | ||||
-rw-r--r-- | board/coral/board.c | 3 | ||||
-rw-r--r-- | board/glkrvp/board.c | 4 | ||||
-rw-r--r-- | board/glkrvp_ite/board.c | 4 | ||||
-rw-r--r-- | board/reef/board.c | 3 | ||||
-rw-r--r-- | board/reef_it8320/board.c | 3 | ||||
-rw-r--r-- | board/yorp/board.c | 6 | ||||
-rw-r--r-- | include/config.h | 4 |
8 files changed, 16 insertions, 16 deletions
diff --git a/board/bip/board.c b/board/bip/board.c index 61295cbfbb..11985d97b0 100644 --- a/board/bip/board.c +++ b/board/bip/board.c @@ -243,3 +243,8 @@ uint16_t tcpc_get_alert_status(void) /* TODO(b/76218141): Flesh out USB code */ return 0; } + +void chipset_pre_init_callback(void) +{ + /* Dummy until chipset support is added. */ +} diff --git a/board/coral/board.c b/board/coral/board.c index ec9d76cd62..3854e56f28 100644 --- a/board/coral/board.c +++ b/board/coral/board.c @@ -502,7 +502,7 @@ const struct temp_sensor_t temp_sensors[] = { BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT); /* Called by APL power state machine when transitioning from G3 to S5 */ -static void chipset_pre_init(void) +void chipset_pre_init_callback(void) { /* * No need to re-init PMIC since settings are sticky across sysjump. @@ -529,7 +529,6 @@ static void chipset_pre_init(void) /* Enable PMIC */ gpio_set_level(GPIO_PMIC_EN, 1); } -DECLARE_HOOK(HOOK_CHIPSET_PRE_INIT, chipset_pre_init, HOOK_PRIO_DEFAULT); static void board_set_tablet_mode(void) { diff --git a/board/glkrvp/board.c b/board/glkrvp/board.c index 02046de236..898c53971c 100644 --- a/board/glkrvp/board.c +++ b/board/glkrvp/board.c @@ -77,7 +77,7 @@ const enum gpio_signal hibernate_wake_pins[] = { const int hibernate_wake_pins_used = ARRAY_SIZE(hibernate_wake_pins); /* Called by APL power state machine when transitioning from G3 to S5 */ -static void chipset_pre_init(void) +void chipset_pre_init_callback(void) { int data; @@ -102,8 +102,6 @@ static void chipset_pre_init(void) /* Enable PMIC_EN: Set the Output port O0.0 to high level */ PCA555_PMIC_GPIO_WRITE(PCA9555_CMD_OUTPUT_PORT_0, data | PCA9555_IO_0); } -DECLARE_HOOK(HOOK_CHIPSET_PRE_INIT, chipset_pre_init, HOOK_PRIO_DEFAULT); - /* Initialize board. */ static void board_init(void) diff --git a/board/glkrvp_ite/board.c b/board/glkrvp_ite/board.c index 2741f7511b..7194259fa6 100644 --- a/board/glkrvp_ite/board.c +++ b/board/glkrvp_ite/board.c @@ -65,7 +65,7 @@ const enum gpio_signal hibernate_wake_pins[] = { const int hibernate_wake_pins_used = ARRAY_SIZE(hibernate_wake_pins); /* Called by APL power state machine when transitioning from G3 to S5 */ -static void chipset_pre_init(void) +void chipset_pre_init_callback(void) { int data; @@ -96,8 +96,6 @@ static void chipset_pre_init(void) I2C_ADDR_PCA555_PMIC_BATT_GPIO, PCA9555_CMD_OUTPUT_PORT_0, data | PCA9555_IO_0); } -DECLARE_HOOK(HOOK_CHIPSET_PRE_INIT, chipset_pre_init, HOOK_PRIO_DEFAULT); - /* Initialize board. */ static void board_init(void) diff --git a/board/reef/board.c b/board/reef/board.c index 868656559e..977a10f70c 100644 --- a/board/reef/board.c +++ b/board/reef/board.c @@ -496,7 +496,7 @@ const struct temp_sensor_t temp_sensors[] = { BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT); /* Called by APL power state machine when transitioning from G3 to S5 */ -static void chipset_pre_init(void) +void chipset_pre_init_callback(void) { /* * No need to re-init PMIC since settings are sticky across sysjump. @@ -523,7 +523,6 @@ static void chipset_pre_init(void) /* Enable PMIC */ gpio_set_level(GPIO_PMIC_EN, 1); } -DECLARE_HOOK(HOOK_CHIPSET_PRE_INIT, chipset_pre_init, HOOK_PRIO_DEFAULT); static void board_set_tablet_mode(void) { diff --git a/board/reef_it8320/board.c b/board/reef_it8320/board.c index 6a4f83800c..490d5c05f8 100644 --- a/board/reef_it8320/board.c +++ b/board/reef_it8320/board.c @@ -277,7 +277,7 @@ const struct temp_sensor_t temp_sensors[] = { BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT); /* Called by APL power state machine when transitioning from G3 to S5 */ -static void chipset_pre_init(void) +void chipset_pre_init_callback(void) { /* * No need to re-init PMIC since settings are sticky across sysjump. @@ -304,7 +304,6 @@ static void chipset_pre_init(void) /* Enable PMIC */ gpio_set_level(GPIO_PMIC_EN, 1); } -DECLARE_HOOK(HOOK_CHIPSET_PRE_INIT, chipset_pre_init, HOOK_PRIO_DEFAULT); static void board_set_tablet_mode(void) { diff --git a/board/yorp/board.c b/board/yorp/board.c index ffd424ecf5..ca130bdb47 100644 --- a/board/yorp/board.c +++ b/board/yorp/board.c @@ -130,12 +130,11 @@ const int usb_port_enable[USB_PORT_COUNT] = { }; /* Called by APL power state machine when transitioning from G3 to S5 */ -static void chipset_pre_init(void) +void chipset_pre_init_callback(void) { /* Enable 5.0V and 3.3V rails, and wait for Power Good */ -#ifdef HAS_TASK_CHIPSET power_5v_enable(task_get_current(), 1); -#endif + gpio_set_level(GPIO_EN_PP3300, 1); while (!gpio_get_level(GPIO_PP5000_PG) || !gpio_get_level(GPIO_PP3300_PG)) @@ -144,7 +143,6 @@ static void chipset_pre_init(void) /* Enable PMIC */ gpio_set_level(GPIO_PMIC_EN, 1); } -DECLARE_HOOK(HOOK_CHIPSET_PRE_INIT, chipset_pre_init, HOOK_PRIO_DEFAULT); /* Called on AP S3 -> S0 transition */ static void board_chipset_resume(void) diff --git a/include/config.h b/include/config.h index 0562575a71..a7ddd3f1f8 100644 --- a/include/config.h +++ b/include/config.h @@ -3536,6 +3536,10 @@ #define CONFIG_CHIPSET_APL_GLK #endif +#if defined(CONFIG_CHIPSET_APL_GLK) +#define CONFIG_CHIPSET_HAS_PRE_INIT_CALLBACK +#endif + /*****************************************************************************/ /* * Apply test config overrides last, since tests need to override some of the |