From d1b3f241b1038c30c0cf55178ab4d641b98c4639 Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Mon, 19 Apr 2021 13:14:24 -0500 Subject: mb/google/*: allow LAN MAC to be read from VPD w/o ChromeOS Condition use of RO_VPD for LAN MAC address on CONFIG_VPD rather than CONFIG_CHROMEOS. Test: build/boot google/{beltino,jecht} with RO_VPD propagated from stock firmware, verify MAC address set correctly. Change-Id: I1606fe1936ccee6e03dee145901767c8e73bfe2d Signed-off-by: Matt DeVillier Reviewed-on: https://review.coreboot.org/c/coreboot/+/52517 Reviewed-by: Angel Pons Reviewed-by: Paul Menzel Tested-by: build bot (Jenkins) --- src/mainboard/google/auron/variants/buddy/variant.c | 2 +- src/mainboard/google/beltino/lan.c | 2 +- src/mainboard/google/butterfly/mainboard.c | 2 +- src/mainboard/google/jecht/lan.c | 2 +- src/mainboard/google/rambi/variants/ninja/lan.c | 2 +- src/mainboard/google/rambi/variants/sumo/lan.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/mainboard/google') diff --git a/src/mainboard/google/auron/variants/buddy/variant.c b/src/mainboard/google/auron/variants/buddy/variant.c index 2ffc38a185..397b54193a 100644 --- a/src/mainboard/google/auron/variants/buddy/variant.c +++ b/src/mainboard/google/auron/variants/buddy/variant.c @@ -119,7 +119,7 @@ static void program_mac_address(u16 io_base) u32 high_dword = 0xD0BA00A0; /* high dword of mac address */ u32 low_dword = 0x0000AD0B; /* low word of mac address as a dword */ - if (CONFIG(CHROMEOS)) { + if (CONFIG(VPD)) { struct region_device rdev; if (fmap_locate_area_as_rdev("RO_VPD", &rdev) == 0) { diff --git a/src/mainboard/google/beltino/lan.c b/src/mainboard/google/beltino/lan.c index d9df5a1404..1104ea7e13 100644 --- a/src/mainboard/google/beltino/lan.c +++ b/src/mainboard/google/beltino/lan.c @@ -100,7 +100,7 @@ static void program_mac_address(u16 io_base) u32 high_dword = 0xD0BA00A0; /* high dword of mac address */ u32 low_dword = 0x0000AD0B; /* low word of mac address as a dword */ - if (CONFIG(CHROMEOS)) { + if (CONFIG(VPD)) { struct region_device rdev; if (fmap_locate_area_as_rdev("RO_VPD", &rdev) == 0) { diff --git a/src/mainboard/google/butterfly/mainboard.c b/src/mainboard/google/butterfly/mainboard.c index d9cf1b9434..6759b86a1d 100644 --- a/src/mainboard/google/butterfly/mainboard.c +++ b/src/mainboard/google/butterfly/mainboard.c @@ -168,7 +168,7 @@ static void mainboard_init(struct device *dev) struct device *ethernet_dev = NULL; void *vpd_file; - if (CONFIG(CHROMEOS)) { + if (CONFIG(VPD)) { struct region_device rdev; if (fmap_locate_area_as_rdev("RO_VPD", &rdev) == 0) { diff --git a/src/mainboard/google/jecht/lan.c b/src/mainboard/google/jecht/lan.c index 4dedb56c70..a431393b00 100644 --- a/src/mainboard/google/jecht/lan.c +++ b/src/mainboard/google/jecht/lan.c @@ -100,7 +100,7 @@ static void program_mac_address(u16 io_base) u32 high_dword = 0xD0BA00A0; /* high dword of mac address */ u32 low_dword = 0x0000AD0B; /* low word of mac address as a dword */ - if (CONFIG(CHROMEOS)) { + if (CONFIG(VPD)) { struct region_device rdev; if (fmap_locate_area_as_rdev("RO_VPD", &rdev) == 0) { diff --git a/src/mainboard/google/rambi/variants/ninja/lan.c b/src/mainboard/google/rambi/variants/ninja/lan.c index 1304071444..0abbffe5f8 100644 --- a/src/mainboard/google/rambi/variants/ninja/lan.c +++ b/src/mainboard/google/rambi/variants/ninja/lan.c @@ -99,7 +99,7 @@ static void program_mac_address(u16 io_base) u32 high_dword = 0xD0BA00A0; /* high dword of mac address */ u32 low_dword = 0x0000AD0B; /* low word of mac address as a dword */ - if (CONFIG(CHROMEOS)) { + if (CONFIG(VPD)) { struct region_device rdev; if (fmap_locate_area_as_rdev("RO_VPD", &rdev) == 0) { diff --git a/src/mainboard/google/rambi/variants/sumo/lan.c b/src/mainboard/google/rambi/variants/sumo/lan.c index 29bc0fe336..66083ae466 100644 --- a/src/mainboard/google/rambi/variants/sumo/lan.c +++ b/src/mainboard/google/rambi/variants/sumo/lan.c @@ -99,7 +99,7 @@ static void program_mac_address(u16 io_base) u32 high_dword = 0xD0BA00A0; /* high dword of mac address */ u32 low_dword = 0x0000AD0B; /* low word of mac address as a dword */ - if (CONFIG(CHROMEOS)) { + if (CONFIG(VPD)) { struct region_device rdev; if (fmap_locate_area_as_rdev("RO_VPD", &rdev) == 0) { -- cgit v1.2.3