From ad1a835c694954a103e3b023c89bb0892a30497c Mon Sep 17 00:00:00 2001 From: Jeff Chase Date: Thu, 4 Jun 2020 17:24:59 -0400 Subject: 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 +- src/mainboard/google/fizz/variants/endeavour/board.c | 19 +++++++++++++++++++ src/mainboard/google/fizz/variants/endeavour/nhlt.c | 14 -------------- 5 files changed, 31 insertions(+), 18 deletions(-) create mode 100644 src/mainboard/google/fizz/variants/endeavour/board.c delete mode 100644 src/mainboard/google/fizz/variants/endeavour/nhlt.c (limited to 'src/mainboard/google') 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/board.c b/src/mainboard/google/fizz/variants/endeavour/board.c new file mode 100644 index 0000000000..0fdc914cf8 --- /dev/null +++ b/src/mainboard/google/fizz/variants/endeavour/board.c @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#include +#include +#include +#include + +void variant_nhlt_oem_overrides(const char **oem_id, + const char **oem_table_id, + uint32_t *oem_revision) +{ + *oem_id = "GOOGLE"; + *oem_table_id = "ENDEAVOUR"; + *oem_revision = 0; +} + +void variant_chip_display_init(void) +{ + +} diff --git a/src/mainboard/google/fizz/variants/endeavour/nhlt.c b/src/mainboard/google/fizz/variants/endeavour/nhlt.c deleted file mode 100644 index 0395a84d8f..0000000000 --- a/src/mainboard/google/fizz/variants/endeavour/nhlt.c +++ /dev/null @@ -1,14 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -#include -#include -#include -#include - -void variant_nhlt_oem_overrides(const char **oem_id, - const char **oem_table_id, - uint32_t *oem_revision) -{ - *oem_id = "GOOGLE"; - *oem_table_id = "ENDEAVOUR"; - *oem_revision = 0; -} -- cgit v1.2.3