/arch/powerpc/platforms/powernv/ |
D | pci-p5ioc2.c | 44 static int pnv_pci_p5ioc2_msi_setup(struct pnv_phb *phb, struct pci_dev *dev, in pnv_pci_p5ioc2_msi_setup() argument 50 msg->data = hwirq - phb->msi_base; in pnv_pci_p5ioc2_msi_setup() 57 static void pnv_pci_init_p5ioc2_msis(struct pnv_phb *phb) in pnv_pci_init_p5ioc2_msis() argument 60 const __be32 *prop = of_get_property(phb->hose->dn, in pnv_pci_init_p5ioc2_msis() 68 if (of_device_is_compatible(phb->hose->dn, "ibm,p5ioc2-pcix")) in pnv_pci_init_p5ioc2_msis() 70 phb->msi_base = be32_to_cpup(prop); in pnv_pci_init_p5ioc2_msis() 71 phb->msi_count = be32_to_cpup(prop + 1); in pnv_pci_init_p5ioc2_msis() 72 bmap_size = BITS_TO_LONGS(phb->msi_count) * sizeof(unsigned long); in pnv_pci_init_p5ioc2_msis() 73 phb->msi_map = zalloc_maybe_bootmem(bmap_size, GFP_KERNEL); in pnv_pci_init_p5ioc2_msis() 74 if (!phb->msi_map) { in pnv_pci_init_p5ioc2_msis() [all …]
|
D | pci-ioda.c | 238 struct pnv_phb *phb = hose->private_data; in pnv_ioda_calc_bus() local 257 min_align = phb->ioda.io_segsize; in pnv_ioda_calc_bus() 261 min_align = phb->ioda.m32_segsize; in pnv_ioda_calc_bus() 361 struct pnv_phb *phb = hose->private_data; in pnv_ioda_setup_pe_segments() local 397 i = pos / phb->ioda.io_segsize; in pnv_ioda_setup_pe_segments() 398 while(i < phb->ioda.total_pe && pos <= region.end) { in pnv_ioda_setup_pe_segments() 399 if (phb->ioda.io_segmap[i]) { in pnv_ioda_setup_pe_segments() 403 phb->ioda.io_segmap[i]); in pnv_ioda_setup_pe_segments() 407 phb->ioda.io_segmap[i] = pe; in pnv_ioda_setup_pe_segments() 408 rc = opal_pci_map_pe_mmio_window(phb->opal_id, pe, in pnv_ioda_setup_pe_segments() [all …]
|
D | pci.c | 49 struct pnv_phb *phb = hose->private_data; in pnv_msi_check_device() local 51 return (phb && phb->msi_map) ? 0 : -ENODEV; in pnv_msi_check_device() 54 static unsigned int pnv_get_one_msi(struct pnv_phb *phb) in pnv_get_one_msi() argument 59 spin_lock_irqsave(&phb->lock, flags); in pnv_get_one_msi() 61 id = find_next_zero_bit(phb->msi_map, phb->msi_count, phb->msi_next); in pnv_get_one_msi() 62 if (id >= phb->msi_count && phb->msi_next) in pnv_get_one_msi() 63 id = find_next_zero_bit(phb->msi_map, phb->msi_count, 0); in pnv_get_one_msi() 64 if (id >= phb->msi_count) { in pnv_get_one_msi() 68 __set_bit(id, phb->msi_map); in pnv_get_one_msi() 69 rc = id + phb->msi_base; in pnv_get_one_msi() [all …]
|
D | pci.h | 80 int (*msi_setup)(struct pnv_phb *phb, struct pci_dev *dev, 83 void (*dma_dev_setup)(struct pnv_phb *phb, struct pci_dev *pdev); 85 u32 (*bdfn_to_pe)(struct pnv_phb *phb, struct pci_bus *bus, u32 devfn);
|
/arch/powerpc/kernel/ |
D | of_platform.c | 42 struct pci_controller *phb; in of_pci_phb_probe() local 51 phb = pcibios_alloc_controller(dev->dev.of_node); in of_pci_phb_probe() 52 if (!phb) in of_pci_phb_probe() 56 phb->parent = &dev->dev; in of_pci_phb_probe() 59 if (ppc_md.pci_setup_phb(phb)) { in of_pci_phb_probe() 60 pcibios_free_controller(phb); in of_pci_phb_probe() 65 pci_process_bridge_OF_ranges(phb, dev->dev.of_node, 0); in of_pci_phb_probe() 68 pci_devs_phb_init_dynamic(phb); in of_pci_phb_probe() 71 eeh_dev_phb_init_dynamic(phb); in of_pci_phb_probe() 80 pcibios_scan_phb(phb); in of_pci_phb_probe() [all …]
|
D | pci_dn.c | 41 struct pci_controller *phb = data; in update_dn_pci_info() local 52 pdn->phb = phb; in update_dn_pci_info() 132 void __devinit pci_devs_phb_init_dynamic(struct pci_controller *phb) in pci_devs_phb_init_dynamic() argument 134 struct device_node *dn = phb->dn; in pci_devs_phb_init_dynamic() 138 update_dn_pci_info(dn, phb); in pci_devs_phb_init_dynamic() 142 pdn->phb = phb; in pci_devs_phb_init_dynamic() 146 traverse_pci_devices(dn, update_dn_pci_info, phb); in pci_devs_phb_init_dynamic() 160 struct pci_controller *phb, *tmp; in pci_devs_phb_init() local 163 list_for_each_entry_safe(phb, tmp, &hose_list, list_node) in pci_devs_phb_init() 164 pci_devs_phb_init_dynamic(phb); in pci_devs_phb_init()
|
D | rtas_pci.c | 71 buid = pdn->phb->buid; in rtas_read_config() 120 buid = pdn->phb->buid; in rtas_write_config() 212 unsigned long __devinit get_phb_buid (struct device_node *phb) in get_phb_buid() argument 218 if (of_address_to_resource(phb, 0, &r)) in get_phb_buid() 224 struct pci_controller *phb) in phb_set_bus_ranges() argument 234 phb->first_busno = bus_range[0]; in phb_set_bus_ranges() 235 phb->last_busno = bus_range[1]; in phb_set_bus_ranges() 240 int __devinit rtas_setup_phb(struct pci_controller *phb) in rtas_setup_phb() argument 242 struct device_node *dev = phb->dn; in rtas_setup_phb() 247 if (phb_set_bus_ranges(dev, phb)) in rtas_setup_phb() [all …]
|
D | io-workarounds.c | 36 struct pci_controller *phb = bus->phb; in iowa_pci_find() local 39 vstart = (unsigned long)phb->io_base_virt; in iowa_pci_find() 40 vend = vstart + phb->pci_io_size - 1; in iowa_pci_find() 47 res = &phb->mem_resources[j]; in iowa_pci_find() 161 void __devinit iowa_register_bus(struct pci_controller *phb, in iowa_register_bus() argument 166 struct device_node *np = phb->dn; in iowa_register_bus() 177 bus->phb = phb; in iowa_register_bus()
|
D | pci_64.c | 247 hose = PCI_DN(hose_node)->phb; in sys_pciconfig_iobase() 268 struct pci_controller *phb = pci_bus_to_host(bus); in pcibus_to_node() local 269 return phb->node; in pcibus_to_node()
|
/arch/powerpc/platforms/pseries/ |
D | eeh_dev.c | 54 struct pci_controller *phb = data; in eeh_dev_init() local 67 edev->phb = phb; in eeh_dev_init() 79 void __devinit eeh_dev_phb_init_dynamic(struct pci_controller *phb) in eeh_dev_phb_init_dynamic() argument 81 struct device_node *dn = phb->dn; in eeh_dev_phb_init_dynamic() 84 eeh_dev_init(dn, phb); in eeh_dev_phb_init_dynamic() 87 traverse_pci_devices(dn, eeh_dev_init, phb); in eeh_dev_phb_init_dynamic() 98 struct pci_controller *phb, *tmp; in eeh_dev_phb_init() local 100 list_for_each_entry_safe(phb, tmp, &hose_list, list_node) in eeh_dev_phb_init() 101 eeh_dev_phb_init_dynamic(phb); in eeh_dev_phb_init()
|
D | pci_dlpar.c | 60 if (!pdn || !pdn->phb || !pdn->phb->bus) in pcibios_find_pci_bus() 63 return find_bus_among_children(pdn->phb->bus, dn); in pcibios_find_pci_bus() 138 struct pci_controller *phb; in init_phb_dynamic() local 142 phb = pcibios_alloc_controller(dn); in init_phb_dynamic() 143 if (!phb) in init_phb_dynamic() 145 rtas_setup_phb(phb); in init_phb_dynamic() 146 pci_process_bridge_OF_ranges(phb, dn, 0); in init_phb_dynamic() 148 pci_devs_phb_init_dynamic(phb); in init_phb_dynamic() 151 eeh_dev_phb_init_dynamic(phb); in init_phb_dynamic() 156 pcibios_scan_phb(phb); in init_phb_dynamic() [all …]
|
D | eeh_pseries.c | 178 config_addr, BUID_HI(edev->phb->buid), in pseries_eeh_set_option() 179 BUID_LO(edev->phb->buid), option); in pseries_eeh_set_option() 212 edev->config_addr, BUID_HI(edev->phb->buid), in pseries_eeh_get_pe_addr() 213 BUID_LO(edev->phb->buid), 1); in pseries_eeh_get_pe_addr() 219 edev->config_addr, BUID_HI(edev->phb->buid), in pseries_eeh_get_pe_addr() 220 BUID_LO(edev->phb->buid), 0); in pseries_eeh_get_pe_addr() 232 edev->config_addr, BUID_HI(edev->phb->buid), in pseries_eeh_get_pe_addr() 233 BUID_LO(edev->phb->buid), 0); in pseries_eeh_get_pe_addr() 275 config_addr, BUID_HI(edev->phb->buid), in pseries_eeh_get_state() 276 BUID_LO(edev->phb->buid)); in pseries_eeh_get_state() [all …]
|
D | iommu.c | 458 static void iommu_table_setparms(struct pci_controller *phb, in iommu_table_setparms() argument 466 node = phb->dn; in iommu_table_setparms() 481 tbl->it_busno = phb->bus->number; in iommu_table_setparms() 484 tbl->it_offset = phb->dma_window_base_cur >> IOMMU_PAGE_SHIFT; in iommu_table_setparms() 487 if (phb->dma_window_base_cur + phb->dma_window_size > 0x80000000ul) { in iommu_table_setparms() 492 phb->dma_window_base_cur += phb->dma_window_size; in iommu_table_setparms() 495 tbl->it_size = phb->dma_window_size >> IOMMU_PAGE_SHIFT; in iommu_table_setparms() 523 static void iommu_table_setparms_lpar(struct pci_controller *phb, in iommu_table_setparms_lpar() argument 532 tbl->it_busno = phb->bus->number; in iommu_table_setparms_lpar() 586 pci->phb->dma_window_size = 0x80000000ul; /* To be divided */ in pci_dma_bus_setup_pSeries() [all …]
|
D | eeh.c | 745 if (!edev->phb) in eeh_restore_one_device_bars() 988 struct device_node *phb; in eeh_init() local 1006 phb = hose->dn; in eeh_init() 1007 traverse_pci_devices(phb, eeh_early_enable, NULL); in eeh_init() 1030 struct pci_controller *phb; in eeh_add_device_early() local 1034 phb = of_node_to_eeh_dev(dn)->phb; in eeh_add_device_early() 1037 if (NULL == phb || 0 == phb->buid) in eeh_add_device_early()
|
/arch/powerpc/platforms/cell/ |
D | celleb_scc_pciex.c | 45 (void)PEX_IN(bus->phb->cfg_addr, PEXDMRDEN0); in scc_pciex_io_flush() 89 static inline unsigned long get_bus_address(struct pci_controller *phb, in get_bus_address() argument 92 return port - ((unsigned long)(phb->io_base_virt) - _IO_BASE); in get_bus_address() 95 static u32 scc_pciex_read_port(struct pci_controller *phb, in scc_pciex_read_port() argument 105 addr = get_bus_address(phb, port); in scc_pciex_read_port() 109 PEX_OUT(phb->cfg_addr, PEXDADRS, (addr & ~0x3ul)); in scc_pciex_read_port() 110 PEX_OUT(phb->cfg_addr, PEXDCMND, cmd); in scc_pciex_read_port() 111 data = PEX_IN(phb->cfg_addr, PEXDRDATA); in scc_pciex_read_port() 121 static void scc_pciex_write_port(struct pci_controller *phb, in scc_pciex_write_port() argument 131 addr = get_bus_address(phb, port); in scc_pciex_write_port() [all …]
|
D | celleb_pci.c | 416 struct pci_controller *phb) in phb_set_bus_ranges() argument 425 phb->first_busno = bus_range[0]; in phb_set_bus_ranges() 426 phb->last_busno = bus_range[1]; in phb_set_bus_ranges() 439 struct pci_controller *phb) in celleb_setup_fake_pci() argument 443 phb->ops = &celleb_fake_pci_ops; in celleb_setup_fake_pci() 444 celleb_alloc_private_mem(phb); in celleb_setup_fake_pci() 448 celleb_setup_fake_pci_device(node, phb); in celleb_setup_fake_pci() 471 int __init celleb_setup_phb(struct pci_controller *phb) in celleb_setup_phb() argument 473 struct device_node *dev = phb->dn; in celleb_setup_phb() 482 phb_set_bus_ranges(dev, phb); in celleb_setup_phb() [all …]
|
D | spider-pci.c | 82 static int __init spiderpci_pci_setup_chip(struct pci_controller *phb, in spiderpci_pci_setup_chip() argument 112 dummy_page_da = dma_map_single(phb->parent, dummy_page_va, in spiderpci_pci_setup_chip() 114 if (dma_mapping_error(phb->parent, dummy_page_da)) { in spiderpci_pci_setup_chip() 129 struct device_node *np = bus->phb->dn; in spiderpci_iowa_init() 156 if (spiderpci_pci_setup_chip(bus->phb, regs)) in spiderpci_iowa_init()
|
D | setup.c | 120 static int __devinit cell_setup_phb(struct pci_controller *phb) in cell_setup_phb() argument 125 int rc = rtas_setup_phb(phb); in cell_setup_phb() 129 np = phb->dn; in cell_setup_phb() 138 iowa_register_bus(phb, &spiderpci_ops, &spiderpci_iowa_init, in cell_setup_phb()
|
/arch/powerpc/platforms/wsp/ |
D | msi.c | 26 struct pci_controller *phb; in wsp_setup_msi_irqs() local 32 phb = pci_bus_to_host(dev->bus); in wsp_setup_msi_irqs() 33 if (!phb) in wsp_setup_msi_irqs() 46 hwirq = wsp_ics_alloc_irq(phb->dn, 1); in wsp_setup_msi_irqs() 72 struct pci_controller *phb; in wsp_teardown_msi_irqs() local 76 phb = pci_bus_to_host(dev->bus); in wsp_teardown_msi_irqs() 90 wsp_ics_free_irq(phb->dn, hwirq); in wsp_teardown_msi_irqs() 94 void wsp_setup_phb_msi(struct pci_controller *phb) in wsp_setup_phb_msi() argument 97 out_be64(phb->cfg_data + PCIE_REG_IODA_ADDR, PCIE_REG_IODA_AD_TBL_MVT); in wsp_setup_phb_msi() 98 out_be64(phb->cfg_data + PCIE_REG_IODA_DATA0, 1ull << 63); in wsp_setup_phb_msi()
|
D | wsp_pci.c | 46 struct wsp_phb *phb; member 277 struct pci_controller *hose = ptbl->phb->hose; in tce_free_wsp() 301 static struct wsp_dma_table *wsp_pci_create_dma32_table(struct wsp_phb *phb, in wsp_pci_create_dma32_table() argument 305 struct pci_controller *hose = phb->hose; in wsp_pci_create_dma32_table() 306 unsigned long size = phb->dma32_region_size; in wsp_pci_create_dma32_table() 307 unsigned long addr = phb->dma32_region_size * region + phb->dma32_base; in wsp_pci_create_dma32_table() 312 nid = of_node_to_nid(phb->hose->dn); in wsp_pci_create_dma32_table() 333 tbl->phb = phb; in wsp_pci_create_dma32_table() 374 spin_lock_irqsave(&phb->lock, flags); in wsp_pci_create_dma32_table() 379 spin_unlock_irqrestore(&phb->lock, flags); in wsp_pci_create_dma32_table() [all …]
|
D | msi.h | 14 extern void wsp_setup_phb_msi(struct pci_controller *phb); 16 static inline void wsp_setup_phb_msi(struct pci_controller *phb) { } in wsp_setup_phb_msi() argument
|
/arch/powerpc/sysdev/ |
D | mv64x60_pci.c | 32 struct pci_dev *phb; in mv64x60_hs_reg_read() local 40 phb = pci_get_bus_and_slot(0, PCI_DEVFN(0, 0)); in mv64x60_hs_reg_read() 41 if (!phb) in mv64x60_hs_reg_read() 43 pci_read_config_dword(phb, MV64X60_PCICFG_CPCI_HOTSWAP, &v); in mv64x60_hs_reg_read() 44 pci_dev_put(phb); in mv64x60_hs_reg_read() 53 struct pci_dev *phb; in mv64x60_hs_reg_write() local 64 phb = pci_get_bus_and_slot(0, PCI_DEVFN(0, 0)); in mv64x60_hs_reg_write() 65 if (!phb) in mv64x60_hs_reg_write() 67 pci_write_config_dword(phb, MV64X60_PCICFG_CPCI_HOTSWAP, v); in mv64x60_hs_reg_write() 68 pci_dev_put(phb); in mv64x60_hs_reg_write()
|
/arch/powerpc/platforms/amigaone/ |
D | setup.c | 73 int phb = -ENODEV; in amigaone_setup_arch() local 77 phb = amigaone_add_bridge(np); in amigaone_setup_arch() 79 BUG_ON(phb != 0); in amigaone_setup_arch()
|
/arch/powerpc/include/asm/ |
D | ppc-pci.h | 41 extern void pci_devs_phb_init_dynamic(struct pci_controller *phb); 46 extern int rtas_setup_phb(struct pci_controller *phb);
|
D | io-workarounds.h | 29 struct pci_controller *phb; member
|