From ff4025c5f789b80e6552dd887c34c34642a98c64 Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Sun, 14 Jan 2018 12:34:43 +0100 Subject: sb/intel/bd82x6x: Reduce function-disable mess MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Most affected boards set the function disabled (FD) register to an arbitrary state dumped from systems running the vendor BIOS. This makes it impossible to enable the devices in devicetree and a pretty big mess of course because nobody cared to keep the register in sync with the devicetree. To get completely rid of most of the writes to FD, move setting of PCH_DISABLE_ALWAYS into the southbridge code where it belongs. Change-Id: Ia2a507cbcdf218d09738e2e16f0d3ad1dcf57b8b Signed-off-by: Nico Huber Reviewed-on: https://review.coreboot.org/23255 Tested-by: build bot (Jenkins) Reviewed-by: Hal Martin Reviewed-by: Stefan Reinauer Reviewed-by: Kyösti Mälkki Reviewed-by: Paul Menzel Reviewed-by: Bill XIE Reviewed-by: Arthur Heymans --- src/mainboard/hp/2570p/romstage.c | 3 +-- src/mainboard/hp/2760p/romstage.c | 3 +-- src/mainboard/hp/8460p/romstage.c | 3 +-- src/mainboard/hp/8470p/romstage.c | 3 +-- src/mainboard/hp/revolve_810_g1/romstage.c | 6 ++---- 5 files changed, 6 insertions(+), 12 deletions(-) (limited to 'src/mainboard/hp') diff --git a/src/mainboard/hp/2570p/romstage.c b/src/mainboard/hp/2570p/romstage.c index 53b44b6c8f..0742543130 100644 --- a/src/mainboard/hp/2570p/romstage.c +++ b/src/mainboard/hp/2570p/romstage.c @@ -32,9 +32,8 @@ void pch_enable_lpc(void) pci_write_config32(PCH_LPC_DEV, LPC_GEN1_DEC, 0x007c0201); } -void rcba_config(void) +void mainboard_rcba_config(void) { - RCBA32(FD) = PCH_DISABLE_ALWAYS | 0x10001fe0; } const struct southbridge_usb_port mainboard_usb_ports[] = { diff --git a/src/mainboard/hp/2760p/romstage.c b/src/mainboard/hp/2760p/romstage.c index 0d48f58e7f..c6d9a7c535 100644 --- a/src/mainboard/hp/2760p/romstage.c +++ b/src/mainboard/hp/2760p/romstage.c @@ -31,9 +31,8 @@ void pch_enable_lpc(void) pci_write_config32(PCH_LPC_DEV, LPC_GEN1_DEC, 0x007c0201); } -void rcba_config(void) +void mainboard_rcba_config(void) { - RCBA32(FD) = PCH_DISABLE_ALWAYS | 0x10001fe0; } const struct southbridge_usb_port mainboard_usb_ports[] = { diff --git a/src/mainboard/hp/8460p/romstage.c b/src/mainboard/hp/8460p/romstage.c index 7d228e99cd..0aa9a1ae58 100644 --- a/src/mainboard/hp/8460p/romstage.c +++ b/src/mainboard/hp/8460p/romstage.c @@ -38,9 +38,8 @@ void pch_enable_lpc(void) pci_write_config32(PCH_LPC_DEV, LPC_GEN1_DEC, 0x007c0201); } -void rcba_config(void) +void mainboard_rcba_config(void) { - RCBA32(FD) = PCH_DISABLE_ALWAYS | 0x10001fe0; } const struct southbridge_usb_port mainboard_usb_ports[] = { diff --git a/src/mainboard/hp/8470p/romstage.c b/src/mainboard/hp/8470p/romstage.c index 2f48aaa6ac..bb9298ca9b 100644 --- a/src/mainboard/hp/8470p/romstage.c +++ b/src/mainboard/hp/8470p/romstage.c @@ -37,9 +37,8 @@ void pch_enable_lpc(void) pci_write_config32(PCH_LPC_DEV, LPC_GEN1_DEC, 0x007c0201); } -void rcba_config(void) +void mainboard_rcba_config(void) { - RCBA32(FD) = PCH_DISABLE_ALWAYS | 0x10001fe0; } const struct southbridge_usb_port mainboard_usb_ports[] = { diff --git a/src/mainboard/hp/revolve_810_g1/romstage.c b/src/mainboard/hp/revolve_810_g1/romstage.c index dbf786eda4..c70660aee9 100644 --- a/src/mainboard/hp/revolve_810_g1/romstage.c +++ b/src/mainboard/hp/revolve_810_g1/romstage.c @@ -37,13 +37,11 @@ void pch_enable_lpc(void) pci_write_config32(PCH_LPC_DEV, LPC_GEN1_DEC, 0x007c0201); } -void rcba_config(void) +void mainboard_rcba_config(void) { - /* Disable devices. */ RCBA32(BUC) = 0x00000000; - RCBA32(FD) = 0x17f21feb; - } + const struct southbridge_usb_port mainboard_usb_ports[] = { { 1, 1, 0 }, { 1, 0, 0 }, -- cgit v1.2.3