From 23dddd5bd3a5f9cebc9a4efc04d73e869dadae96 Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Sat, 28 Mar 2015 22:14:53 -0700 Subject: google/urara: retrieve network device information from VPD Invoke the function which copies MAC addresses from VPD into the coreboot table and calibration data into CBMEM. BRANCH=none BUG=chrome-os-partner:36584 TEST=with the rest of the patches applied observed that the MAC addresses from VPD get copied into the appropriate kernel device tree nodes. Change-Id: I68e2b73520853ef2d3249ca12ee87669fd01f442 Signed-off-by: Patrick Georgi Original-Commit-Id: 12f935098c50e2df345748d3b71cee2152acd422 Original-Change-Id: I6e1483d33480d13380ade2dddae6c92fd3f1f881 Original-Signed-off-by: Vadim Bendebury Original-Reviewed-on: https://chromium-review.googlesource.com/262844 Original-Reviewed-by: Aaron Durbin Reviewed-on: http://review.coreboot.org/9897 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/mainboard/google/urara/mainboard.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/mainboard/google/urara') diff --git a/src/mainboard/google/urara/mainboard.c b/src/mainboard/google/urara/mainboard.c index 0a0cb020cc..0409dab946 100644 --- a/src/mainboard/google/urara/mainboard.c +++ b/src/mainboard/google/urara/mainboard.c @@ -24,9 +24,20 @@ #include #include +#include + +static void mainboard_init(device_t dev) +{ +#if IS_ENABLED(CONFIG_CHROMEOS) + /* Copy WIFI calibration data into CBMEM. */ + cbmem_add_vpd_calibration_data(); +#endif +} + static void mainboard_enable(device_t dev) { printk(BIOS_INFO, "Enable Pistachio device...\n"); + dev->ops->init = &mainboard_init; } struct chip_operations mainboard_ops = { @@ -42,4 +53,9 @@ void lb_board(struct lb_header *header) dma->size = sizeof(*dma); dma->range_start = (uintptr_t)_dma_coherent; dma->range_size = _dma_coherent_size; + +#if IS_ENABLED(CONFIG_CHROMEOS) + /* Retrieve the switch interface MAC addressses. */ + lb_table_add_macs_from_vpd(header); +#endif } -- cgit v1.2.3