summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/southbridge/via/vt8237r/bootblock.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/southbridge/via/vt8237r/bootblock.c b/src/southbridge/via/vt8237r/bootblock.c
index b231f844c9..8df37aad7c 100644
--- a/src/southbridge/via/vt8237r/bootblock.c
+++ b/src/southbridge/via/vt8237r/bootblock.c
@@ -33,20 +33,23 @@ static void bootblock_southbridge_init(void)
dev = pci_locate_device_on_bus(PCI_ID(PCI_VENDOR_ID_VIA,
PCI_DEVICE_ID_VIA_VT8237R_LPC), 0);
- if (dev == PCI_DEV_INVALID) {
- /* Power management controller */
- dev = pci_locate_device_on_bus(PCI_ID(PCI_VENDOR_ID_VIA,
- PCI_DEVICE_ID_VIA_VT8237S_LPC), 0);
+ if (dev != PCI_DEV_INVALID)
+ goto found;
- if (dev == PCI_DEV_INVALID) {
- /* Power management controller */
- dev = pci_locate_device_on_bus(PCI_ID(PCI_VENDOR_ID_VIA,
- PCI_DEVICE_ID_VIA_VT8237A_LPC), 0);
+ /* Power management controller */
+ dev = pci_locate_device_on_bus(PCI_ID(PCI_VENDOR_ID_VIA,
+ PCI_DEVICE_ID_VIA_VT8237S_LPC), 0);
+
+ if (dev != PCI_DEV_INVALID)
+ goto found;
+
+ /* Power management controller */
+ dev = pci_locate_device_on_bus(PCI_ID(PCI_VENDOR_ID_VIA,
+ PCI_DEVICE_ID_VIA_VT8237A_LPC), 0);
- if (dev == PCI_DEV_INVALID)
- return;
- }
- }
+ if (dev == PCI_DEV_INVALID)
+ return;
+found:
pci_write_config8(dev, 0x41, 0x7f);
}