Lines Matching refs:devfn
127 #define MACRISC_CFA0(devfn, off) \ argument
132 #define MACRISC_CFA1(bus, devfn, off) \ argument
134 |(((unsigned int)(devfn)) << 8) \
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
245 else if (devfn == 0) in u3_ht_skip_device()
250 if (PCI_DN(dn) && PCI_DN(dn)->devfn == devfn) in u3_ht_skip_device()
266 #define U3_HT_CFA0(devfn, off) \ argument
267 ((((unsigned int)devfn) << 8) | offset)
268 #define U3_HT_CFA1(bus, devfn, off) \ argument
269 (U3_HT_CFA0(devfn, off) \
274 u8 devfn, u8 offset, int *swap) in u3_ht_cfg_access() argument
278 if (devfn != 0) in u3_ht_cfg_access()
279 return hose->cfg_data + U3_HT_CFA0(devfn, offset); 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
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
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()
386 #define U4_PCIE_CFA0(devfn, off) \ argument
392 #define U4_PCIE_CFA1(bus, devfn, off) \ argument
394 |(((unsigned int)(devfn)) << 8) \
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
590 devfn = (prop[0] >> 8) & 0xff; in fixup_nec_usb2()
592 if (PCI_FUNC(devfn) != 0) 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()
1145 if (PCI_FUNC(dev->devfn) > 0) { in fixup_k2_sata()