Lines Matching refs:devfn
84 static unsigned long u3_agp_cfa0(u8 devfn, u8 off) in u3_agp_cfa0() argument
86 return (1 << (unsigned long)PCI_SLOT(devfn)) | in u3_agp_cfa0()
87 ((unsigned long)PCI_FUNC(devfn) << 8) | in u3_agp_cfa0()
91 static unsigned long u3_agp_cfa1(u8 bus, u8 devfn, u8 off) in u3_agp_cfa1() argument
94 ((unsigned long)devfn << 8) | in u3_agp_cfa1()
120 static int u3_agp_read_config(struct pci_bus *bus, unsigned int devfn, in u3_agp_read_config() argument
130 addr = u3_agp_cfg_access(hose, bus->number, devfn, offset); in u3_agp_read_config()
151 static int u3_agp_write_config(struct pci_bus *bus, unsigned int devfn, in u3_agp_write_config() argument
161 addr = u3_agp_cfg_access(hose, bus->number, devfn, offset); in u3_agp_write_config()
188 static unsigned long u3_ht_cfa0(u8 devfn, u8 off) in u3_ht_cfa0() argument
190 return (devfn << 8) | off; in u3_ht_cfa0()
193 static unsigned long u3_ht_cfa1(u8 bus, u8 devfn, u8 off) in u3_ht_cfa1() argument
195 return u3_ht_cfa0(devfn, off) + (bus << 16) + 0x01000000UL; in u3_ht_cfa1()
199 u8 bus, u8 devfn, u8 offset) in u3_ht_cfg_access() argument
202 if (PCI_SLOT(devfn) == 0) in u3_ht_cfg_access()
204 return hose->cfg_data + u3_ht_cfa0(devfn, offset); in u3_ht_cfg_access()
206 return hose->cfg_data + u3_ht_cfa1(bus, devfn, offset); in u3_ht_cfg_access()
257 static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn, in u3_ht_read_config() argument
267 if (bus->number == hose->first_busno && devfn == PCI_DEVFN(0, 0)) in u3_ht_read_config()
273 addr = u3_ht_cfg_access(hose, bus->number, devfn, offset); in u3_ht_read_config()
295 static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn, in u3_ht_write_config() argument
305 if (bus->number == hose->first_busno && devfn == PCI_DEVFN(0, 0)) in u3_ht_write_config()
311 addr = u3_ht_cfg_access(hose, bus->number, devfn, offset); in u3_ht_write_config()
338 static unsigned int u4_pcie_cfa0(unsigned int devfn, unsigned int off) in u4_pcie_cfa0() argument
340 return (1 << PCI_SLOT(devfn)) | in u4_pcie_cfa0()
341 (PCI_FUNC(devfn) << 8) | in u4_pcie_cfa0()
346 static unsigned int u4_pcie_cfa1(unsigned int bus, unsigned int devfn, in u4_pcie_cfa1() argument
350 (devfn << 8) | in u4_pcie_cfa1()
374 static int u4_pcie_read_config(struct pci_bus *bus, unsigned int devfn, in u4_pcie_read_config() argument
385 addr = u4_pcie_cfg_access(hose, bus->number, devfn, offset); in u4_pcie_read_config()
405 static int u4_pcie_write_config(struct pci_bus *bus, unsigned int devfn, in u4_pcie_write_config() argument
416 addr = u4_pcie_cfg_access(hose, bus->number, devfn, offset); in u4_pcie_write_config()