Lines Matching refs:bus

132 #define MACRISC_CFA1(bus, devfn, off)	\  argument
133 ((((unsigned int)(bus)) << 16) \
138 static void __iomem *macrisc_cfg_map_bus(struct pci_bus *bus, in macrisc_cfg_map_bus() argument
145 hose = pci_bus_to_host(bus); in macrisc_cfg_map_bus()
149 if (bus->number == hose->first_busno) { in macrisc_cfg_map_bus()
154 caddr = MACRISC_CFA1(bus->number, dev_fn, offset); in macrisc_cfg_map_bus()
176 static void __iomem *chaos_map_bus(struct pci_bus *bus, unsigned int devfn, in chaos_map_bus() argument
184 np = of_pci_find_child_device(bus->dev.of_node, devfn); in chaos_map_bus()
197 return macrisc_cfg_map_bus(bus, devfn, offset); in chaos_map_bus()
233 struct pci_bus *bus, unsigned int devfn) in u3_ht_skip_device() argument
243 if (bus->self) in u3_ht_skip_device()
244 busdn = pci_device_to_OF_node(bus->self); in u3_ht_skip_device()
268 #define U3_HT_CFA1(bus, devfn, off) \ argument
270 + (((unsigned int)bus) << 16) \
273 static void __iomem *u3_ht_cfg_access(struct pci_controller *hose, u8 bus, in u3_ht_cfg_access() argument
277 if (bus == hose->first_busno) { in u3_ht_cfg_access()
283 return hose->cfg_data + U3_HT_CFA1(bus, devfn, offset); in u3_ht_cfg_access()
286 static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn, in u3_ht_read_config() argument
293 hose = pci_bus_to_host(bus); in u3_ht_read_config()
298 addr = u3_ht_cfg_access(hose, bus->number, devfn, offset, &swap); in u3_ht_read_config()
302 switch (u3_ht_skip_device(hose, bus, devfn)) { in u3_ht_read_config()
337 static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn, in u3_ht_write_config() argument
344 hose = pci_bus_to_host(bus); in u3_ht_write_config()
349 addr = u3_ht_cfg_access(hose, bus->number, devfn, offset, &swap); in u3_ht_write_config()
353 switch (u3_ht_skip_device(hose, bus, devfn)) { in u3_ht_write_config()
392 #define U4_PCIE_CFA1(bus, devfn, off) \ argument
393 ((((unsigned int)(bus)) << 16) \
399 static void __iomem *u4_pcie_cfg_map_bus(struct pci_bus *bus, in u4_pcie_cfg_map_bus() argument
409 hose = pci_bus_to_host(bus); in u4_pcie_cfg_map_bus()
413 if (bus->number == hose->first_busno) { in u4_pcie_cfg_map_bus()
416 caddr = U4_PCIE_CFA1(bus->number, dev_fn, offset); in u4_pcie_cfg_map_bus()
444 dev->dev.of_node = pcibios_get_phb_of_node(dev->bus); in pmac_pci_fixup_u4_of_node()
498 u8 bus, devfn; in init_p2pbridge() local
508 if (pci_device_from_OF_node(p2pbridge, &bus, &devfn) < 0) { in init_p2pbridge()
520 if (early_read_config_word(hose, bus, devfn, in init_p2pbridge()
527 early_write_config_word(hose, bus, devfn, PCI_BRIDGE_CONTROL, val); in init_p2pbridge()
535 unsigned char bus, devfn; in init_second_ohare() local
544 if (pci_device_from_OF_node(np, &bus, &devfn) == 0) { in init_second_ohare()
552 early_read_config_word(hose, bus, devfn, PCI_COMMAND, &cmd); in init_second_ohare()
555 early_write_config_word(hose, bus, devfn, PCI_COMMAND, cmd); in init_second_ohare()
575 u8 bus, devfn; in fixup_nec_usb2() local
591 bus = (prop[0] >> 16) & 0xff; in fixup_nec_usb2()
597 early_read_config_dword(hose, bus, devfn, 0xe4, &data); in fixup_nec_usb2()
602 early_write_config_dword(hose, bus, devfn, 0xe4, data); in fixup_nec_usb2()
1189 struct pci_controller *host = pci_bus_to_host(dev->bus); in fixup_u4_pcie()
1231 static int pmac_pci_probe_mode(struct pci_bus *bus) in pmac_pci_probe_mode() argument
1233 struct device_node *node = pci_bus_to_OF_node(bus); in pmac_pci_probe_mode()
1239 if (bus->self == NULL && (of_device_is_compatible(node, "u3-agp") || in pmac_pci_probe_mode()