- 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
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user