From 33b59c9170a66a7f6d9c26ccf664714ea81d218d Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Thu, 11 Feb 2021 13:42:20 +0100 Subject: haswell: Drop `mainboard_fill_pei_data` Use global variables to provide mainboard USB settings, and have the northbridge code copy it into the `pei_data` struct. For now. To minimize diffstat noise, this patch does not reindent the now-global mainboard USB configuration arrays. This is cleaned up in a follow-up. Change-Id: I273c7a6cd46734ae25b95fc11b5e188d63cac32e Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/50538 Reviewed-by: Arthur Heymans Reviewed-by: HAOUAS Elyes Tested-by: build bot (Jenkins) --- src/mainboard/intel/baskingridge/romstage.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/mainboard/intel') diff --git a/src/mainboard/intel/baskingridge/romstage.c b/src/mainboard/intel/baskingridge/romstage.c index 192751707a..9c4c9b7e77 100644 --- a/src/mainboard/intel/baskingridge/romstage.c +++ b/src/mainboard/intel/baskingridge/romstage.c @@ -49,9 +49,7 @@ void mb_get_spd_map(uint8_t spd_map[4]) spd_map[3] = 0xa6; } -void mainboard_fill_pei_data(struct pei_data *pei_data) -{ - struct usb2_port_setting usb2_ports[MAX_USB2_PORTS] = { + const struct usb2_port_setting mainboard_usb2_ports[MAX_USB2_PORTS] = { /* Length, Enable, OCn#, Location */ { 0x0040, 1, 0, /* P0: Back USB3 port (OC0) */ USB_PORT_BACK_PANEL }, @@ -83,7 +81,7 @@ void mainboard_fill_pei_data(struct pei_data *pei_data) USB_PORT_FRONT_PANEL }, }; - struct usb3_port_setting usb3_ports[MAX_USB3_PORTS] = { + const struct usb3_port_setting mainboard_usb3_ports[MAX_USB3_PORTS] = { /* Enable, OCn# */ { 1, 0 }, /* P1; */ { 1, 0 }, /* P2; */ @@ -92,7 +90,3 @@ void mainboard_fill_pei_data(struct pei_data *pei_data) { 1, 0 }, /* P6; */ { 1, 0 }, /* P6; */ }; - - memcpy(pei_data->usb2_ports, usb2_ports, sizeof(usb2_ports)); - memcpy(pei_data->usb3_ports, usb3_ports, sizeof(usb3_ports)); -} -- cgit v1.2.3