On 4/20/10 11:47 PM, Rudolf Marek wrote:
Does it work better like this?
/* Power management controller */ dev = pci_locate_device(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(PCI_ID(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT8237S_LPC), 0);
} // close scope early
if (dev == PCI_DEV_INVALID) return; pci_write_config8(dev, 0x41, 0x7f);
If not, we should make a test case and send it to eric.
....
+static void bootblock_southbridge_init(void) {
functions should have their opening bracket on the next line
- /* ROM decode last 8MB FF800000 - FFFFFFFF on VT8237S/VT8237A */
- /* ROM decode last 4MB FFC00000 - FFFFFFFF on VT8237R */
- /* get SB on 0:11.0, because pci_locate_device construct similar in
enable_rom_decode() did not worked for some reason */
- pci_write_config8(PCI_DEV(0,0x11,0), 0x41, 0x7f);
+}
Is the device always on 0, 0x11, 0? If not, we should add a more explicit comment saying TODO and explaining why the broken code was checked in.