Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/48781 )
Change subject: coreboot_table: Convert some CONFIG(CHROMEOS) preprocessor ......................................................................
coreboot_table: Convert some CONFIG(CHROMEOS) preprocessor
Change-Id: I1e63a419db92642df6b7956050c39540c2ae11d6 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/lib/coreboot_table.c M src/mainboard/google/smaug/mainboard.c M src/mainboard/google/storm/mainboard.c 3 files changed, 11 insertions(+), 12 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/81/48781/1
diff --git a/src/lib/coreboot_table.c b/src/lib/coreboot_table.c index 440c1c3..20421ef 100644 --- a/src/lib/coreboot_table.c +++ b/src/lib/coreboot_table.c @@ -151,7 +151,6 @@ gpios->size += table_size; }
-#if CONFIG(CHROMEOS) static void lb_gpios(struct lb_header *header) { struct lb_gpios *gpios; @@ -190,6 +189,7 @@ } }
+#if CONFIG(CHROMEOS) static void lb_vbnv(struct lb_header *header) { #if CONFIG(PC80_SYSTEM) @@ -486,10 +486,11 @@ /* 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 @@ -510,9 +511,8 @@ /* 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 f547fd0..852e73d 100644 --- a/src/mainboard/google/smaug/mainboard.c +++ b/src/mainboard/google/smaug/mainboard.c @@ -203,8 +203,8 @@
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 57fc1d0..6a89be0 100644 --- a/src/mainboard/google/storm/mainboard.c +++ b/src/mainboard/google/storm/mainboard.c @@ -110,8 +110,7 @@ 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); }
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48781 )
Change subject: coreboot_table: Convert some CONFIG(CHROMEOS) preprocessor ......................................................................
Patch Set 1: Code-Review+2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48781 )
Change subject: coreboot_table: Convert some CONFIG(CHROMEOS) preprocessor ......................................................................
Patch Set 3: Code-Review+2
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48781 )
Change subject: coreboot_table: Convert some CONFIG(CHROMEOS) preprocessor ......................................................................
Patch Set 3: Code-Review+2
Angel Pons has submitted this change. ( https://review.coreboot.org/c/coreboot/+/48781 )
Change subject: coreboot_table: Convert some CONFIG(CHROMEOS) preprocessor ......................................................................
coreboot_table: Convert some CONFIG(CHROMEOS) preprocessor
Change-Id: I1e63a419db92642df6b7956050c39540c2ae11d6 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/48781 Reviewed-by: Angel Pons th3fanbus@gmail.com Reviewed-by: Arthur Heymans arthur@aheymans.xyz Reviewed-by: Patrick Rudolph siro@das-labor.org Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/lib/coreboot_table.c M src/mainboard/google/smaug/mainboard.c M src/mainboard/google/storm/mainboard.c 3 files changed, 11 insertions(+), 12 deletions(-)
Approvals: build bot (Jenkins): Verified Patrick Rudolph: Looks good to me, approved Arthur Heymans: Looks good to me, approved Angel Pons: Looks good to me, approved
diff --git a/src/lib/coreboot_table.c b/src/lib/coreboot_table.c index d6fd84a..e00c2a4 100644 --- a/src/lib/coreboot_table.c +++ b/src/lib/coreboot_table.c @@ -152,7 +152,6 @@ gpios->size += table_size; }
-#if CONFIG(CHROMEOS) static void lb_gpios(struct lb_header *header) { struct lb_gpios *gpios; @@ -191,6 +190,7 @@ } }
+#if CONFIG(CHROMEOS) static void lb_vbnv(struct lb_header *header) { #if CONFIG(PC80_SYSTEM) @@ -487,10 +487,11 @@ /* 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 @@ /* 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 f547fd0..852e73d 100644 --- a/src/mainboard/google/smaug/mainboard.c +++ b/src/mainboard/google/smaug/mainboard.c @@ -203,8 +203,8 @@
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 57fc1d0..6a89be0 100644 --- a/src/mainboard/google/storm/mainboard.c +++ b/src/mainboard/google/storm/mainboard.c @@ -110,8 +110,7 @@ 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); }