From 4b19bfbb64df4a070ec3fcd81a6c76c3c5d2f470 Mon Sep 17 00:00:00 2001 From: Vincent Palatin Date: Wed, 1 Jun 2016 15:13:12 -0700 Subject: [PATCH] veyron: fievel/tiger: retrieve MAC address from VPD Reads the MAC address from the VPD ethernet_mac0 if it exists, stores it the coreboot table for depthcharge consumption. Signed-off-by: Vincent Palatin BRANCH=veyron BUG=chrome-os-partner:53191 chrome-os-partner:53964 TEST=along with the matching depthcharge change, provision a MAC address on a Tiger device by doing 'vpd -s ethernet_mac0=0a1f9c9bfada' and ensure that it is properly set in the MAC hardware after reboot by running 'ifconfig' and checking '/proc/device-tree/ethernet\@ff290000/mac-address'. Change-Id: I0a7bb25cd6b094261dda2be25aa89b38b4707868 Reviewed-on: https://chromium-review.googlesource.com/348831 Tested-by: Vincent Palatin Reviewed-by: Julius Werner Commit-Queue: Vincent Palatin --- src/mainboard/google/veyron_fievel/mainboard.c | 3 +++ src/mainboard/google/veyron_tiger/mainboard.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/mainboard/google/veyron_fievel/mainboard.c b/src/mainboard/google/veyron_fievel/mainboard.c index 51b9552eba..5435faa0c7 100644 --- a/src/mainboard/google/veyron_fievel/mainboard.c +++ b/src/mainboard/google/veyron_fievel/mainboard.c @@ -141,6 +141,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; + + /* Retrieve the on-board Ethernet MAC address. */ + lb_table_add_macs_from_vpd(header); } void mainboard_power_on_backlight(void) diff --git a/src/mainboard/google/veyron_tiger/mainboard.c b/src/mainboard/google/veyron_tiger/mainboard.c index 51b9552eba..5435faa0c7 100644 --- a/src/mainboard/google/veyron_tiger/mainboard.c +++ b/src/mainboard/google/veyron_tiger/mainboard.c @@ -141,6 +141,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; + + /* Retrieve the on-board Ethernet MAC address. */ + lb_table_add_macs_from_vpd(header); } void mainboard_power_on_backlight(void)