From 2c626f332b938caabb38f85db5cafb2f502b5a52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Sat, 19 Dec 2020 22:21:23 +0200 Subject: coreboot_table: Convert some CONFIG(CHROMEOS) preprocessor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I1e63a419db92642df6b7956050c39540c2ae11d6 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/48781 Reviewed-by: Angel Pons Reviewed-by: Arthur Heymans Reviewed-by: Patrick Rudolph Tested-by: build bot (Jenkins) --- src/lib/coreboot_table.c | 12 ++++++------ src/mainboard/google/smaug/mainboard.c | 6 +++--- src/mainboard/google/storm/mainboard.c | 5 ++--- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/lib/coreboot_table.c b/src/lib/coreboot_table.c index d6fd84ae99..e00c2a4a52 100644 --- a/src/lib/coreboot_table.c +++ b/src/lib/coreboot_table.c @@ -152,7 +152,6 @@ void lb_add_gpios(struct lb_gpios *gpios, const struct lb_gpio *gpio_table, gpios->size += table_size; } -#if CONFIG(CHROMEOS) static void lb_gpios(struct lb_header *header) { struct lb_gpios *gpios; @@ -191,6 +190,7 @@ static void lb_gpios(struct lb_header *header) } } +#if CONFIG(CHROMEOS) static void lb_vbnv(struct lb_header *header) { #if CONFIG(PC80_SYSTEM) @@ -487,10 +487,11 @@ static uintptr_t write_coreboot_table(uintptr_t rom_table_end) /* Record our framebuffer */ lb_framebuffer(head); -#if CONFIG(CHROMEOS) /* Record our GPIO settings (ChromeOS specific) */ - lb_gpios(head); + if (CONFIG(CHROMEOS)) + lb_gpios(head); +#if CONFIG(CHROMEOS) /* pass along VBNV offsets in CMOS */ lb_vbnv(head); #endif @@ -511,9 +512,8 @@ static uintptr_t write_coreboot_table(uintptr_t rom_table_end) /* Add board-specific table entries, if any. */ lb_board(head); -#if CONFIG(CHROMEOS_RAMOOPS) - lb_ramoops(head); -#endif + if (CONFIG(CHROMEOS_RAMOOPS)) + lb_ramoops(head); lb_boot_media_params(head); diff --git a/src/mainboard/google/smaug/mainboard.c b/src/mainboard/google/smaug/mainboard.c index f547fd01f1..852e73de67 100644 --- a/src/mainboard/google/smaug/mainboard.c +++ b/src/mainboard/google/smaug/mainboard.c @@ -203,8 +203,8 @@ struct chip_operations mainboard_ops = { void lb_board(struct lb_header *header) { -#if CONFIG(CHROMEOS) - lb_table_add_serialno_from_vpd(header); -#endif + if (CONFIG(CHROMEOS)) + lb_table_add_serialno_from_vpd(header); + soc_add_mtc(header); } diff --git a/src/mainboard/google/storm/mainboard.c b/src/mainboard/google/storm/mainboard.c index 57fc1d07fa..6a89be04df 100644 --- a/src/mainboard/google/storm/mainboard.c +++ b/src/mainboard/google/storm/mainboard.c @@ -110,8 +110,7 @@ void lb_board(struct lb_header *header) dma->range_start = (uintptr_t)_dma_coherent; dma->range_size = REGION_SIZE(dma_coherent); -#if CONFIG(CHROMEOS) /* Retrieve the switch interface MAC addresses. */ - lb_table_add_macs_from_vpd(header); -#endif + if (CONFIG(CHROMEOS)) + lb_table_add_macs_from_vpd(header); } -- cgit v1.2.3