From ad1a835c694954a103e3b023c89bb0892a30497c Mon Sep 17 00:00:00 2001 From: Jeff Chase Date: Thu, 4 Jun 2020 17:24:59 -0400 Subject: [PATCH] mb/google/fizz: add variant chipset display init The Endeavour variant does not have a DisplayPort input so there's no need to wait for it. BUG=b:147830399 BRANCH=none TEST=boot endeavour; check coreboot logs Signed-off-by: Jeff Chase Change-Id: I30c7c47f19a61ce66c6c923864d80870d2761859 Reviewed-on: https://review.coreboot.org/c/coreboot/+/42085 Tested-by: build bot (Jenkins) Reviewed-by: Shelley Chen --- src/mainboard/google/fizz/mainboard.c | 12 +++++++++--- .../variants/baseboard/include/baseboard/variants.h | 2 ++ .../google/fizz/variants/endeavour/Makefile.inc | 2 +- .../fizz/variants/endeavour/{nhlt.c => board.c} | 5 +++++ 4 files changed, 17 insertions(+), 4 deletions(-) rename src/mainboard/google/fizz/variants/endeavour/{nhlt.c => board.c} (88%) diff --git a/src/mainboard/google/fizz/mainboard.c b/src/mainboard/google/fizz/mainboard.c index 7b8905888a..0945b9c8ce 100644 --- a/src/mainboard/google/fizz/mainboard.c +++ b/src/mainboard/google/fizz/mainboard.c @@ -250,10 +250,8 @@ static void wait_for_hpd(gpio_t gpio, long timeout) stopwatch_duration_msecs(&sw)); } -static void mainboard_chip_init(void *chip_info) +void __weak variant_chip_display_init(void) { - const struct pad_config *pads; - size_t num; static const long display_timeout_ms = 3000; /* This is reconfigured back to whatever FSP-S expects by @@ -264,6 +262,14 @@ static void mainboard_chip_init(void *chip_info) if (google_chromeec_wait_for_displayport(display_timeout_ms)) wait_for_hpd(GPIO_DP_HPD, display_timeout_ms); } +} + +static void mainboard_chip_init(void *chip_info) +{ + const struct pad_config *pads; + size_t num; + + variant_chip_display_init(); pads = variant_gpio_table(&num); gpio_configure_pads(pads, num); diff --git a/src/mainboard/google/fizz/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/fizz/variants/baseboard/include/baseboard/variants.h index c72df8f302..cf2292673e 100644 --- a/src/mainboard/google/fizz/variants/baseboard/include/baseboard/variants.h +++ b/src/mainboard/google/fizz/variants/baseboard/include/baseboard/variants.h @@ -23,4 +23,6 @@ void variant_nhlt_init(struct nhlt *nhlt); void variant_nhlt_oem_overrides(const char **oem_id, const char **oem_table_id, uint32_t *oem_revision); +void variant_chip_display_init(void); + #endif /* __BASEBOARD_VARIANTS_H__ */ diff --git a/src/mainboard/google/fizz/variants/endeavour/Makefile.inc b/src/mainboard/google/fizz/variants/endeavour/Makefile.inc index 0ad298b5f4..ded8a3572a 100644 --- a/src/mainboard/google/fizz/variants/endeavour/Makefile.inc +++ b/src/mainboard/google/fizz/variants/endeavour/Makefile.inc @@ -1,4 +1,4 @@ bootblock-y += gpio.c ramstage-y += gpio.c -ramstage-y += nhlt.c +ramstage-y += board.c diff --git a/src/mainboard/google/fizz/variants/endeavour/nhlt.c b/src/mainboard/google/fizz/variants/endeavour/board.c similarity index 88% rename from src/mainboard/google/fizz/variants/endeavour/nhlt.c rename to src/mainboard/google/fizz/variants/endeavour/board.c index 0395a84d8f..0fdc914cf8 100644 --- a/src/mainboard/google/fizz/variants/endeavour/nhlt.c +++ b/src/mainboard/google/fizz/variants/endeavour/board.c @@ -12,3 +12,8 @@ void variant_nhlt_oem_overrides(const char **oem_id, *oem_table_id = "ENDEAVOUR"; *oem_revision = 0; } + +void variant_chip_display_init(void) +{ + +}