mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-13 03:15:06 +00:00
APL/GLK boards: Use chipset_pre_init_callback
This change updates all APL/GLK boards to use chipset_pre_init_callback instead of hook. BUG=b:78259506 BRANCH=None TEST=Verified that yorp still boots. Change-Id: I71ab0f1111e89a254db83fc58abfdfe8eacd3575 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://chromium-review.googlesource.com/1018734 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
e54c3e1728
commit
8faa22cb27
@@ -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. */
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user