summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorEric Biederman <ebiederm@xmission.com>2003-09-02 03:36:25 +0000
committerEric Biederman <ebiederm@xmission.com>2003-09-02 03:36:25 +0000
commite9a271e32c53076445ef70da8aec8201c82693ec (patch)
treeaf88f51ba907922157d3b97f9713a07480223372 /src/arch
parentd4c14524f53d8e812cf52b57e16c53d259c44ea0 (diff)
- Major update of the dynamic device tree so it can handle
* subtractive resources * merging with the static device tree * more device types than just pci - The piece to watch out for is the new enable_resources method that was needed in all of the drivers git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1096 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/i386/lib/pci_ops.c24
-rw-r--r--src/arch/ppc/lib/pci_ops.c14
2 files changed, 19 insertions, 19 deletions
diff --git a/src/arch/i386/lib/pci_ops.c b/src/arch/i386/lib/pci_ops.c
index c3478ffa96..9a8616a90a 100644
--- a/src/arch/i386/lib/pci_ops.c
+++ b/src/arch/i386/lib/pci_ops.c
@@ -220,49 +220,49 @@ static const struct pci_ops *pci_check_direct(void)
uint8_t pci_read_config8(device_t dev, unsigned where)
{
uint8_t value;
- value = conf->read8(dev->bus->secondary, dev->devfn, where);
+ value = conf->read8(dev->bus->secondary, dev->path.u.pci.devfn, where);
printk_spew("Read config 8 bus %d,devfn 0x%x,reg 0x%x,val 0x%x\n",
- dev->bus->secondary, dev->devfn, where, value);
+ dev->bus->secondary, dev->path.u.pci.devfn, where, value);
return value;
}
uint16_t pci_read_config16(device_t dev, unsigned where)
{
uint16_t value;
- value = conf->read16(dev->bus->secondary, dev->devfn, where);
+ value = conf->read16(dev->bus->secondary, dev->path.u.pci.devfn, where);
printk_spew( "Read config 16 bus %d,devfn 0x%x,reg 0x%x,val 0x%x\n",
- dev->bus->secondary, dev->devfn, where, value);
+ dev->bus->secondary, dev->path.u.pci.devfn, where, value);
return value;
}
uint32_t pci_read_config32(device_t dev, unsigned where)
{
uint32_t value;
- value = conf->read32(dev->bus->secondary, dev->devfn, where);
+ value = conf->read32(dev->bus->secondary, dev->path.u.pci.devfn, where);
printk_spew( "Read config 32 bus %d,devfn 0x%x,reg 0x%x,val 0x%x\n",
- dev->bus->secondary, dev->devfn, where, value);
+ dev->bus->secondary, dev->path.u.pci.devfn, where, value);
return value;
}
void pci_write_config8(device_t dev, unsigned where, uint8_t val)
{
printk_spew( "Write config 8 bus %d, devfn 0x%x, reg 0x%x, val 0x%x\n",
- dev->bus->secondary, dev->devfn, where, val);
- conf->write8(dev->bus->secondary, dev->devfn, where, val);
+ dev->bus->secondary, dev->path.u.pci.devfn, where, val);
+ conf->write8(dev->bus->secondary, dev->path.u.pci.devfn, where, val);
}
void pci_write_config16(device_t dev, unsigned where, uint16_t val)
{
printk_spew( "Write config 16 bus %d, devfn 0x%x, reg 0x%x, val 0x%x\n",
- dev->bus->secondary, dev->devfn, where, val);
- conf->write16(dev->bus->secondary, dev->devfn, where, val);
+ dev->bus->secondary, dev->path.u.pci.devfn, where, val);
+ conf->write16(dev->bus->secondary, dev->path.u.pci.devfn, where, val);
}
void pci_write_config32(device_t dev, unsigned where, uint32_t val)
{
printk_spew( "Write config 32 bus %d, devfn 0x%x, reg 0x%x, val 0x%x\n",
- dev->bus->secondary, dev->devfn, where, val);
- conf->write32(dev->bus->secondary, dev->devfn, where, val);
+ dev->bus->secondary, dev->path.u.pci.devfn, where, val);
+ conf->write32(dev->bus->secondary, dev->path.u.pci.devfn, where, val);
}
/** Set the method to be used for PCI, type I or type II
diff --git a/src/arch/ppc/lib/pci_ops.c b/src/arch/ppc/lib/pci_ops.c
index 69c9915ad6..eef6eef30c 100644
--- a/src/arch/ppc/lib/pci_ops.c
+++ b/src/arch/ppc/lib/pci_ops.c
@@ -65,34 +65,34 @@ static int pci_sanity_check(const struct pci_ops *o)
return 0;
}
-uint8_t pci_read_config8(struct device *dev, unsigned where)
+uint8_t pci_read_config8(device_t dev, unsigned where)
{
- return conf->read8(dev->bus->secondary, dev->devfn, where);
+ return conf->read8(dev->bus->secondary, dev->path.u.pci.devfn, where);
}
uint16_t pci_read_config16(struct device *dev, unsigned where)
{
- return conf->read16(dev->bus->secondary, dev->devfn, where);
+ return conf->read16(dev->bus->secondary, dev->path.u.pci.devfn, where);
}
uint32_t pci_read_config32(struct device *dev, unsigned where)
{
- return conf->read32(dev->bus->secondary, dev->devfn, where);
+ return conf->read32(dev->bus->secondary, dev->path.u.pci.devfn, where);
}
void pci_write_config8(struct device *dev, unsigned where, uint8_t val)
{
- conf->write8(dev->bus->secondary, dev->devfn, where, val);
+ conf->write8(dev->bus->secondary, dev->path.u.pci.devfn, where, val);
}
void pci_write_config16(struct device *dev, unsigned where, uint16_t val)
{
- conf->write16(dev->bus->secondary, dev->devfn, where, val);
+ conf->write16(dev->bus->secondary, dev->path.u.pci.devfn, where, val);
}
void pci_write_config32(struct device *dev, unsigned where, uint32_t val)
{
- conf->write32(dev->bus->secondary, dev->devfn, where, val);
+ conf->write32(dev->bus->secondary, dev->path.u.pci.devfn, where, val);
}
/** Set the method to be used for PCI