Lines Matching refs:devfn
123 #define MACRISC_CFA0(devfn, off) \ argument
128 #define MACRISC_CFA1(bus, devfn, off) \ argument
130 |(((unsigned int)(devfn)) << 8) \
172 static void __iomem *chaos_map_bus(struct pci_bus *bus, unsigned int devfn, in chaos_map_bus() argument
180 np = of_pci_find_child_device(bus->dev.of_node, devfn); in chaos_map_bus()
193 return macrisc_cfg_map_bus(bus, devfn, offset); in chaos_map_bus()
229 struct pci_bus *bus, unsigned int devfn) in u3_ht_skip_device() argument
241 else if (devfn == 0) in u3_ht_skip_device()
246 if (PCI_DN(dn) && PCI_DN(dn)->devfn == devfn) in u3_ht_skip_device()
262 #define U3_HT_CFA0(devfn, off) \ argument
263 ((((unsigned int)devfn) << 8) | offset)
264 #define U3_HT_CFA1(bus, devfn, off) \ argument
265 (U3_HT_CFA0(devfn, off) \
270 u8 devfn, u8 offset, int *swap) in u3_ht_cfg_access() argument
274 if (devfn != 0) in u3_ht_cfg_access()
275 return hose->cfg_data + U3_HT_CFA0(devfn, offset); in u3_ht_cfg_access()
279 return hose->cfg_data + U3_HT_CFA1(bus, devfn, offset); in u3_ht_cfg_access()
282 static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn, in u3_ht_read_config() argument
294 addr = u3_ht_cfg_access(hose, bus->number, devfn, offset, &swap); in u3_ht_read_config()
298 switch (u3_ht_skip_device(hose, bus, devfn)) { in u3_ht_read_config()
333 static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn, in u3_ht_write_config() argument
345 addr = u3_ht_cfg_access(hose, bus->number, devfn, offset, &swap); in u3_ht_write_config()
349 switch (u3_ht_skip_device(hose, bus, devfn)) { in u3_ht_write_config()
382 #define U4_PCIE_CFA0(devfn, off) \ argument
388 #define U4_PCIE_CFA1(bus, devfn, off) \ argument
390 |(((unsigned int)(devfn)) << 8) \
494 u8 bus, devfn; in init_p2pbridge() local
502 if (pci_device_from_OF_node(p2pbridge, &bus, &devfn) < 0) { in init_p2pbridge()
514 if (early_read_config_word(hose, bus, devfn, in init_p2pbridge()
521 early_write_config_word(hose, bus, devfn, PCI_BRIDGE_CONTROL, val); in init_p2pbridge()
529 unsigned char bus, devfn; in init_second_ohare() local
538 if (pci_device_from_OF_node(np, &bus, &devfn) == 0) { in init_second_ohare()
546 early_read_config_word(hose, bus, devfn, PCI_COMMAND, &cmd); in init_second_ohare()
549 early_write_config_word(hose, bus, devfn, PCI_COMMAND, cmd); in init_second_ohare()
569 u8 bus, devfn; in fixup_nec_usb2() local
584 devfn = (prop[0] >> 8) & 0xff; in fixup_nec_usb2()
586 if (PCI_FUNC(devfn) != 0) in fixup_nec_usb2()
591 early_read_config_dword(hose, bus, devfn, 0xe4, &data); in fixup_nec_usb2()
596 early_write_config_dword(hose, bus, devfn, 0xe4, data); in fixup_nec_usb2()
1147 if (PCI_FUNC(dev->devfn) > 0) { in fixup_k2_sata()