diff --git a/src/mainboard/google/corsola/Kconfig b/src/mainboard/google/corsola/Kconfig index e53ae8259d..3bb43bc4c4 100644 --- a/src/mainboard/google/corsola/Kconfig +++ b/src/mainboard/google/corsola/Kconfig @@ -12,6 +12,10 @@ config BOARD_GOOGLE_KRABBY_COMMON def_bool n select BOARD_GOOGLE_CORSOLA_COMMON +config BOARD_GOOGLE_STARMIE_COMMON + def_bool n + select BOARD_GOOGLE_CORSOLA_COMMON + if BOARD_GOOGLE_CORSOLA_COMMON config VBOOT @@ -54,6 +58,7 @@ config MAINBOARD_PART_NUMBER default "Tentacruel" if BOARD_GOOGLE_TENTACRUEL default "Magikarp" if BOARD_GOOGLE_MAGIKARP default "Voltorb" if BOARD_GOOGLE_VOLTORB + default "Starmie" if BOARD_GOOGLE_STARMIE config BOOT_DEVICE_SPI_FLASH_BUS int diff --git a/src/mainboard/google/corsola/Kconfig.name b/src/mainboard/google/corsola/Kconfig.name index 902ed1db5e..90f3b480fc 100644 --- a/src/mainboard/google/corsola/Kconfig.name +++ b/src/mainboard/google/corsola/Kconfig.name @@ -25,3 +25,9 @@ config BOARD_GOOGLE_TENTACRUEL config BOARD_GOOGLE_MAGIKARP bool "-> Magikarp" select BOARD_GOOGLE_KRABBY_COMMON + +comment "Starmie" + +config BOARD_GOOGLE_STARMIE + bool "-> Starmie" + select BOARD_GOOGLE_STARMIE_COMMON diff --git a/src/mainboard/google/corsola/display.c b/src/mainboard/google/corsola/display.c index bfe3f05ebb..22d8c399fd 100644 --- a/src/mainboard/google/corsola/display.c +++ b/src/mainboard/google/corsola/display.c @@ -125,14 +125,11 @@ static const struct edp_bridge ps8640_bridge = { .post_power_on = bridge_ps8640_post_power_on, }; -_Static_assert(CONFIG(BOARD_GOOGLE_KINGLER_COMMON) + CONFIG(BOARD_GOOGLE_KRABBY_COMMON) == 1, - "Exactly one of KINGLER and KRABBY must be set"); - int configure_display(void) { struct edid edid; const u8 i2c_bus = I2C0; - const struct edp_bridge *bridge; + const struct edp_bridge *bridge = NULL; uint32_t board_version = board_id(); if (CONFIG(BOARD_GOOGLE_KINGLER_COMMON)) @@ -140,9 +137,12 @@ int configure_display(void) bridge = &ps8640_bridge; else bridge = &anx7625_bridge; - else /* BOARD_GOOGLE_KRABBY_COMMON */ + else if (CONFIG(BOARD_GOOGLE_KRABBY_COMMON)) bridge = &ps8640_bridge; + if (!bridge) + return -1; + printk(BIOS_INFO, "%s: Starting display init\n", __func__); mtk_i2c_bus_init(i2c_bus, I2C_SPEED_FAST); @@ -181,6 +181,7 @@ int configure_display(void) return -1; } + assert(bridge->post_power_on); if (bridge->post_power_on(i2c_bus, &edid) < 0) { printk(BIOS_ERR, "%s: Failed to post power on bridge\n", __func__); return -1;