summaryrefslogtreecommitdiff
path: root/src/southbridge
diff options
context:
space:
mode:
authorTobias Diedrich <ranma+coreboot@tdiedrich.de>2010-11-07 18:51:13 +0000
committerRudolf Marek <r.marek@assembler.cz>2010-11-07 18:51:13 +0000
commite165d41b08bcf121cc5d9eaae20cd33f0f3180af (patch)
tree0d1185a6a33caab0c4c8d5396c7f2e26e9b1b679 /src/southbridge
parentef2928e708b881d6d54c2308a4c596a6d003743b (diff)
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> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6041 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/southbridge')
-rw-r--r--src/southbridge/via/vt8237r/vt8237r_early_smbus.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/southbridge/via/vt8237r/vt8237r_early_smbus.c b/src/southbridge/via/vt8237r/vt8237r_early_smbus.c
index 83eb227932..931a94662d 100644
--- a/src/southbridge/via/vt8237r/vt8237r_early_smbus.c
+++ b/src/southbridge/via/vt8237r/vt8237r_early_smbus.c
@@ -244,17 +244,15 @@ void smbus_fixup(const struct mem_controller *ctrl)
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);