Lines Matching defs:bus
26 #define PA_PXP_CFA(bus, devfn, off) (((bus) << 20) | ((devfn) << 12) | (off))
28 static inline int pa_pxp_offset_valid(u8 bus, u8 devfn, int offset)
34 if (bus == 0 && devfn == 0)
41 u8 bus, u8 devfn, int offset)
43 return hose->cfg_data + PA_PXP_CFA(bus, devfn, offset);
58 static int workaround_5945(struct pci_bus *bus, unsigned int devfn,
66 if (!is_root_port(bus->number, devfn) || !is_5945_reg(offset))
69 hose = pci_bus_to_host(bus);
71 addr = pa_pxp_cfg_addr(hose, bus->number, devfn, offset & ~0x3);
78 dummy = pa_pxp_cfg_addr(hose, bus->number, devfn, 0x10);
106 static void sb600_set_flag(int bus)
134 if (bus == SB600_BUS) {
136 * This is the SB600's bus, tell the PCI-e root port
151 static void sb600_set_flag(int bus)
156 static int pa_pxp_read_config(struct pci_bus *bus, unsigned int devfn,
162 hose = pci_bus_to_host(bus);
166 if (!pa_pxp_offset_valid(bus->number, devfn, offset))
169 if (workaround_5945(bus, devfn, offset, len, val))
172 addr = pa_pxp_cfg_addr(hose, bus->number, devfn, offset);
174 sb600_set_flag(bus->number);
195 static int pa_pxp_write_config(struct pci_bus *bus, unsigned int devfn,
201 hose = pci_bus_to_host(bus);
205 if (!pa_pxp_offset_valid(bus->number, devfn, offset))
208 addr = pa_pxp_cfg_addr(hose, bus->number, devfn, offset);
210 sb600_set_flag(bus->number);
289 hose = pci_bus_to_host(dev->bus);
291 return (void __iomem *)pa_pxp_cfg_addr(hose, dev->bus->number, dev->devfn, offset);