Author: ruik Date: Sun Nov 7 19:51:13 2010 New Revision: 6041 URL: https://tracker.coreboot.org/trac/coreboot/changeset/6041
Log: Use get_vt8237_lpc() in vt8237_sb_enable_fid_vid() too. I broke this out into a seperate part to keep the other half as straight-forward as possible.
Signed-off-by: Tobias Diedrich ranma+coreboot@tdiedrich.de Acked-by: Rudolf Marek r.marek@assembler.cz
Modified: trunk/src/southbridge/via/vt8237r/vt8237r_early_smbus.c
Modified: trunk/src/southbridge/via/vt8237r/vt8237r_early_smbus.c ============================================================================== --- trunk/src/southbridge/via/vt8237r/vt8237r_early_smbus.c Sun Nov 7 19:46:13 2010 (r6040) +++ trunk/src/southbridge/via/vt8237r/vt8237r_early_smbus.c Sun Nov 7 19:51:13 2010 (r6041) @@ -244,17 +244,15 @@ void vt8237_sb_enable_fid_vid(void) { device_t dev, devctl; + u16 devid;
/* 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); - if (dev == PCI_DEV_INVALID) - return; + dev = get_vt8237_lpc(); + if (dev == PCI_DEV_INVALID) + return;
+ devid = pci_read_config16(dev, PCI_DEVICE_ID); + if (devid == PCI_DEVICE_ID_VIA_VT8237S_LPC) { devctl = pci_locate_device(PCI_ID(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT8237_VLINK), 0);