aboutsummaryrefslogtreecommitdiff
path: root/src/devices/device.c
diff options
context:
space:
mode:
authorEric Biederman <ebiederm@xmission.com>2003-06-12 19:23:51 +0000
committerEric Biederman <ebiederm@xmission.com>2003-06-12 19:23:51 +0000
commit7a5416af9574095c6df28fb8192fe4c063afa8da (patch)
tree66cc3bb27f8319255ebab48ba774d584693d4c22 /src/devices/device.c
parent540ae01cd341de75f5eb57906699ca24667d71cc (diff)
- Modify the freebios tree so the pci config space api is mostly in sync between
code that runs without ram and code that runs with ram. git-svn-id: svn://svn.coreboot.org/coreboot/trunk@869 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/devices/device.c')
-rw-r--r--src/devices/device.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/devices/device.c b/src/devices/device.c
index 77752e5bab..291c10cde2 100644
--- a/src/devices/device.c
+++ b/src/devices/device.c
@@ -274,7 +274,7 @@ static void allocate_vga_resource(void)
bus = vga = 0;
for(dev = all_devices; dev; dev = dev->next) {
uint32_t class_revision;
- pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_revision);
+ class_revision = pci_read_config32(dev, PCI_CLASS_REVISION);
if (((class_revision >> 24) == 0x03) &&
((class_revision >> 16) != 0x380)) {
if (!vga) {
@@ -296,9 +296,9 @@ static void allocate_vga_resource(void)
/* Now walk up the bridges setting the VGA enable */
while(bus) {
uint16_t ctrl;
- pci_read_config_word(bus, PCI_BRIDGE_CONTROL, &ctrl);
+ ctrl = pci_read_config16(bus, PCI_BRIDGE_CONTROL);
ctrl |= PCI_BRIDGE_CTL_VGA;
- pci_write_config_word(bus, PCI_BRIDGE_CONTROL, ctrl);
+ pci_write_config16(bus, PCI_BRIDGE_CONTROL, ctrl);
bus = (bus == bus->bus)? 0 : bus->bus;
}
}
@@ -331,13 +331,13 @@ static void enable_resources(struct device *bus)
*/
for (curdev = all_devices; curdev; curdev = curdev->next) {
uint16_t command;
- pci_read_config_word(curdev, PCI_COMMAND, &command);
+ command = pci_read_config16(curdev, PCI_COMMAND);
command |= curdev->command;
printk_debug("DEV: %02x:%02x.%01x cmd <- %02x\n",
curdev->bus->secondary,
PCI_SLOT(curdev->devfn), PCI_FUNC(curdev->devfn),
command);
- pci_write_config_word(curdev, PCI_COMMAND, command);
+ pci_write_config16(curdev, PCI_COMMAND, command);
}
}