[RFC v3 1/5] PCI: initial commit

Antony Pavlov antonynpavlov at gmail.com
Tue Jul 1 00:48:30 PDT 2014


On Tue, 01 Jul 2014 09:29:23 +0200
Clément Léger <clement.leger at kalray.eu> wrote:

> > +int
> > +pci_read_config_byte(struct pci_dev *dev, u8 where, u8 *val)
> > +{
> > +	return pci_bus_read_config_byte(dev->bus, dev->devfn, where, val);
> > +}
> > +
> > +int
> > +pci_read_config_word(struct pci_dev *dev, u8 where, u16 *val)
> > +{
> > +	return pci_bus_read_config_word(dev->bus, dev->devfn, where, val);
> > +}
> > +
> > +int
> > +pci_read_config_dword(struct pci_dev *dev, u8 where, u32 *val)
> > +{
> > +	return pci_bus_read_config_dword(dev->bus, dev->devfn, where, val);
> > +}
> > +
> > +int
> > +pci_write_config_byte(struct pci_dev *dev, u8 where, u8 val)
> > +{
> > +	return pci_bus_write_config_byte(dev->bus, dev->devfn, where, val);
> > +}
> > +
> > +int
> > +pci_write_config_word(struct pci_dev *dev, u8 where, u16 val)
> > +{
> > +	return pci_bus_write_config_word(dev->bus, dev->devfn, where, val);
> > +}
> > +
> > +int
> > +pci_write_config_dword(struct pci_dev *dev, u8 where, u32 val)
> > +{
> > +	return pci_bus_write_config_dword(dev->bus, dev->devfn, where, val);
> > +}
> >
> I would suggest replacing the "u8 where" (in pci_read/write_config and 
> others) by "int where" to allow future access to PCIe extended 
> configuration space (up to offset 0x1000).

Already done in [RFC v4] patchseries!

-- 
Best regards,
  Antony Pavlov



More information about the barebox mailing list