Lines Matching refs:devfn

55 					 unsigned int devfn, int where)  in cns3xxx_pci_map_bus()  argument
59 int slot = PCI_SLOT(devfn); in cns3xxx_pci_map_bus()
72 if (devfn == 0) /* device# and function# are ignored by hw */ in cns3xxx_pci_map_bus()
85 return base + (where & 0xffc) + (devfn << 12); in cns3xxx_pci_map_bus()
88 static int cns3xxx_pci_read_config(struct pci_bus *bus, unsigned int devfn, in cns3xxx_pci_read_config() argument
95 ret = pci_generic_config_read32(bus, devfn, where, size, val); in cns3xxx_pci_read_config()
97 if (ret == PCIBIOS_SUCCESSFUL && !bus->number && !devfn && in cns3xxx_pci_read_config()
136 pci_domain_nr(dev->bus), dev->bus->number, PCI_SLOT(dev->devfn), in cns3xxx_pcie_map_irq()
137 PCI_FUNC(dev->devfn), slot, pin, irq); in cns3xxx_pcie_map_irq()
229 u32 devfn = 0; in cns3xxx_pcie_hw_init() local
234 pci_bus_write_config_byte(&bus, devfn, PCI_PRIMARY_BUS, 0); in cns3xxx_pcie_hw_init()
235 pci_bus_write_config_byte(&bus, devfn, PCI_SECONDARY_BUS, 1); in cns3xxx_pcie_hw_init()
236 pci_bus_write_config_byte(&bus, devfn, PCI_SUBORDINATE_BUS, 1); in cns3xxx_pcie_hw_init()
238 pci_bus_read_config_byte(&bus, devfn, PCI_PRIMARY_BUS, &tmp8); in cns3xxx_pcie_hw_init()
239 pci_bus_read_config_byte(&bus, devfn, PCI_SECONDARY_BUS, &tmp8); in cns3xxx_pcie_hw_init()
240 pci_bus_read_config_byte(&bus, devfn, PCI_SUBORDINATE_BUS, &tmp8); in cns3xxx_pcie_hw_init()
242 pci_bus_write_config_word(&bus, devfn, PCI_MEMORY_BASE, mem_base); in cns3xxx_pcie_hw_init()
243 pci_bus_write_config_word(&bus, devfn, PCI_MEMORY_LIMIT, mem_limit); in cns3xxx_pcie_hw_init()
244 pci_bus_write_config_word(&bus, devfn, PCI_IO_BASE_UPPER16, io_base); in cns3xxx_pcie_hw_init()
245 pci_bus_write_config_word(&bus, devfn, PCI_IO_LIMIT_UPPER16, io_limit); in cns3xxx_pcie_hw_init()
252 devfn = PCI_DEVFN(0, 0); in cns3xxx_pcie_hw_init()
253 pos = pci_bus_find_capability(&bus, devfn, PCI_CAP_ID_EXP); in cns3xxx_pcie_hw_init()
254 pci_bus_read_config_word(&bus, devfn, pos + PCI_EXP_DEVCTL, &dc); in cns3xxx_pcie_hw_init()
257 pci_bus_write_config_word(&bus, devfn, pos + PCI_EXP_DEVCTL, dc); in cns3xxx_pcie_hw_init()
258 pci_bus_read_config_word(&bus, devfn, pos + PCI_EXP_DEVCTL, &dc); in cns3xxx_pcie_hw_init()