/arch/powerpc/platforms/powernv/ |
D | pci-ioda.c | 117 static inline bool pnv_pci_is_m64(struct pnv_phb *phb, struct resource *r) in pnv_pci_is_m64() argument 126 return (r->start >= phb->ioda.m64_base && in pnv_pci_is_m64() 127 r->start < (phb->ioda.m64_base + phb->ioda.m64_size)); in pnv_pci_is_m64() 137 static struct pnv_ioda_pe *pnv_ioda_init_pe(struct pnv_phb *phb, int pe_no) in pnv_ioda_init_pe() argument 141 phb->ioda.pe_array[pe_no].phb = phb; in pnv_ioda_init_pe() 142 phb->ioda.pe_array[pe_no].pe_number = pe_no; in pnv_ioda_init_pe() 149 rc = opal_pci_eeh_freeze_clear(phb->opal_id, pe_no, in pnv_ioda_init_pe() 153 __func__, rc, phb->hose->global_number, pe_no); in pnv_ioda_init_pe() 155 return &phb->ioda.pe_array[pe_no]; in pnv_ioda_init_pe() 158 static void pnv_ioda_reserve_pe(struct pnv_phb *phb, int pe_no) in pnv_ioda_reserve_pe() argument [all …]
|
D | pci-cxl.c | 15 struct pnv_phb *phb = hose->private_data; in pnv_phb_to_cxl_mode() local 25 rc = opal_pci_set_phb_cxl_mode(phb->opal_id, mode, pe->pe_number); in pnv_phb_to_cxl_mode() 41 struct pnv_phb *phb = hose->private_data; in pnv_cxl_alloc_hwirqs() local 42 int hwirq = msi_bitmap_alloc_hwirqs(&phb->msi_bmp, num); in pnv_cxl_alloc_hwirqs() 49 return phb->msi_base + hwirq; in pnv_cxl_alloc_hwirqs() 56 struct pnv_phb *phb = hose->private_data; in pnv_cxl_release_hwirqs() local 58 msi_bitmap_free_hwirqs(&phb->msi_bmp, hwirq - phb->msi_base, num); in pnv_cxl_release_hwirqs() 66 struct pnv_phb *phb = hose->private_data; in pnv_cxl_release_hwirq_ranges() local 75 hwirq = irqs->offset[i] - phb->msi_base; in pnv_cxl_release_hwirq_ranges() 76 msi_bitmap_free_hwirqs(&phb->msi_bmp, hwirq, in pnv_cxl_release_hwirq_ranges() [all …]
|
D | eeh-powernv.c | 57 struct pnv_phb *phb; in pnv_eeh_init() local 75 phb = hose->private_data; in pnv_eeh_init() 77 if (phb->model == PNV_PHB_MODEL_P7IOC) in pnv_eeh_init() 80 if (phb->diag_data_size > max_diag_size) in pnv_eeh_init() 81 max_diag_size = phb->diag_data_size; in pnv_eeh_init() 90 if (phb->ioda.reserved_pe_idx != 0) in pnv_eeh_init() 163 struct pnv_phb *phb = hose->private_data; in pnv_eeh_dbgfs_set() local 165 out_be64(phb->regs + offset, val); in pnv_eeh_dbgfs_set() 172 struct pnv_phb *phb = hose->private_data; in pnv_eeh_dbgfs_get() local 174 *val = in_be64(phb->regs + offset); in pnv_eeh_dbgfs_get() [all …]
|
D | pci.c | 162 struct pnv_phb *phb = hose->private_data; in pnv_setup_msi_irqs() local 169 if (WARN_ON(!phb) || !phb->msi_bmp.bitmap) in pnv_setup_msi_irqs() 172 if (pdev->no_64bit_msi && !phb->msi32_support) in pnv_setup_msi_irqs() 176 if (!entry->msi_attrib.is_64 && !phb->msi32_support) { in pnv_setup_msi_irqs() 181 hwirq = msi_bitmap_alloc_hwirqs(&phb->msi_bmp, 1); in pnv_setup_msi_irqs() 187 virq = irq_create_mapping(NULL, phb->msi_base + hwirq); in pnv_setup_msi_irqs() 191 msi_bitmap_free_hwirqs(&phb->msi_bmp, hwirq, 1); in pnv_setup_msi_irqs() 194 rc = phb->msi_setup(phb, pdev, phb->msi_base + hwirq, in pnv_setup_msi_irqs() 199 msi_bitmap_free_hwirqs(&phb->msi_bmp, hwirq, 1); in pnv_setup_msi_irqs() 211 struct pnv_phb *phb = hose->private_data; in pnv_teardown_msi_irqs() local [all …]
|
D | pci.h | 43 struct pnv_phb *phb; member 108 int (*msi_setup)(struct pnv_phb *phb, struct pci_dev *dev, 111 void (*dma_dev_setup)(struct pnv_phb *phb, struct pci_dev *pdev); 112 int (*init_m64)(struct pnv_phb *phb); 113 int (*get_pe_state)(struct pnv_phb *phb, int pe_no); 114 void (*freeze_pe)(struct pnv_phb *phb, int pe_no); 115 int (*unfreeze_pe)(struct pnv_phb *phb, int pe_no, int opt); 197 extern void pnv_set_msi_irq_chip(struct pnv_phb *phb, unsigned int virq); 214 extern void pnv_pci_ioda2_tce_invalidate_entire(struct pnv_phb *phb, bool rm);
|
D | npu-dma.c | 27 pdev = pci_get_domain_bus_and_slot(pci_domain_nr(pdn->phb->bus), in get_pci_dev() 100 struct pnv_phb *phb; in get_gpu_pci_dev_and_pe() local 115 phb = hose->private_data; in get_gpu_pci_dev_and_pe() 116 pe = &phb->ioda.pe_array[pdn->pe_number]; in get_gpu_pci_dev_and_pe() 132 struct pnv_phb *phb = npe->phb; in pnv_npu_set_window() local 148 rc = opal_pci_map_pe_dma_window(phb->opal_id, in pnv_npu_set_window() 159 pnv_pci_ioda2_tce_invalidate_entire(phb, false); in pnv_npu_set_window() 162 pnv_pci_link_table_and_group(phb->hose->node, num, in pnv_npu_set_window() 172 struct pnv_phb *phb = npe->phb; in pnv_npu_unset_window() local 180 rc = opal_pci_map_pe_dma_window(phb->opal_id, npe->pe_number, in pnv_npu_unset_window() [all …]
|
/arch/powerpc/platforms/pseries/ |
D | pci_dlpar.c | 39 struct pci_controller *phb; in init_phb_dynamic() local 43 phb = pcibios_alloc_controller(dn); in init_phb_dynamic() 44 if (!phb) in init_phb_dynamic() 46 rtas_setup_phb(phb); in init_phb_dynamic() 47 pci_process_bridge_OF_ranges(phb, dn, 0); in init_phb_dynamic() 48 phb->controller_ops = pseries_pci_controller_ops; in init_phb_dynamic() 50 pci_devs_phb_init_dynamic(phb); in init_phb_dynamic() 53 eeh_dev_phb_init_dynamic(phb); in init_phb_dynamic() 58 pcibios_scan_phb(phb); in init_phb_dynamic() 59 pcibios_finish_adding_to_bus(phb->bus); in init_phb_dynamic() [all …]
|
D | eeh_pseries.c | 281 pe.phb = pdn->phb; in pseries_eeh_probe() 362 config_addr, BUID_HI(pe->phb->buid), in pseries_eeh_set_option() 363 BUID_LO(pe->phb->buid), option); in pseries_eeh_set_option() 393 pe->config_addr, BUID_HI(pe->phb->buid), in pseries_eeh_get_pe_addr() 394 BUID_LO(pe->phb->buid), 1); in pseries_eeh_get_pe_addr() 400 pe->config_addr, BUID_HI(pe->phb->buid), in pseries_eeh_get_pe_addr() 401 BUID_LO(pe->phb->buid), 0); in pseries_eeh_get_pe_addr() 404 __func__, pe->phb->global_number, pe->config_addr); in pseries_eeh_get_pe_addr() 413 pe->config_addr, BUID_HI(pe->phb->buid), in pseries_eeh_get_pe_addr() 414 BUID_LO(pe->phb->buid), 0); in pseries_eeh_get_pe_addr() [all …]
|
D | iommu.c | 466 static void iommu_table_setparms(struct pci_controller *phb, in iommu_table_setparms() argument 474 node = phb->dn; in iommu_table_setparms() 489 tbl->it_busno = phb->bus->number; in iommu_table_setparms() 493 tbl->it_offset = phb->dma_window_base_cur >> tbl->it_page_shift; in iommu_table_setparms() 496 if (phb->dma_window_base_cur + phb->dma_window_size > 0x80000000ul) { in iommu_table_setparms() 501 phb->dma_window_base_cur += phb->dma_window_size; in iommu_table_setparms() 504 tbl->it_size = phb->dma_window_size >> tbl->it_page_shift; in iommu_table_setparms() 516 static void iommu_table_setparms_lpar(struct pci_controller *phb, in iommu_table_setparms_lpar() argument 526 tbl->it_busno = phb->bus->number; in iommu_table_setparms_lpar() 589 pci->phb->dma_window_size = 0x80000000ul; /* To be divided */ in pci_dma_bus_setup_pSeries() [all …]
|
/arch/powerpc/kernel/ |
D | of_platform.c | 37 struct pci_controller *phb; in of_pci_phb_probe() local 46 phb = pcibios_alloc_controller(dev->dev.of_node); in of_pci_phb_probe() 47 if (!phb) in of_pci_phb_probe() 51 phb->parent = &dev->dev; in of_pci_phb_probe() 54 if (ppc_md.pci_setup_phb(phb)) { in of_pci_phb_probe() 55 pcibios_free_controller(phb); in of_pci_phb_probe() 60 pci_process_bridge_OF_ranges(phb, dev->dev.of_node, 0); in of_pci_phb_probe() 63 pci_devs_phb_init_dynamic(phb); in of_pci_phb_probe() 66 eeh_dev_phb_init_dynamic(phb); in of_pci_phb_probe() 73 pcibios_scan_phb(phb); in of_pci_phb_probe() [all …]
|
D | msi.c | 14 struct pci_controller *phb = pci_bus_to_host(dev->bus); in arch_setup_msi_irqs() local 16 if (!phb->controller_ops.setup_msi_irqs || in arch_setup_msi_irqs() 17 !phb->controller_ops.teardown_msi_irqs) { in arch_setup_msi_irqs() 26 return phb->controller_ops.setup_msi_irqs(dev, nvec, type); in arch_setup_msi_irqs() 31 struct pci_controller *phb = pci_bus_to_host(dev->bus); in arch_teardown_msi_irqs() local 37 if (phb->controller_ops.teardown_msi_irqs) in arch_teardown_msi_irqs() 38 phb->controller_ops.teardown_msi_irqs(dev); in arch_teardown_msi_irqs()
|
D | pci-hotplug.c | 42 if (!pdn || !pdn->phb || !pdn->phb->bus) in pci_find_bus_by_node() 45 return find_bus_among_children(pdn->phb->bus, dn); in pci_find_bus_by_node() 57 struct pci_controller *phb = pci_bus_to_host(dev->bus); in pcibios_release_device() local 62 if (phb->controller_ops.release_device) in pcibios_release_device() 63 phb->controller_ops.release_device(dev); in pcibios_release_device() 112 struct pci_controller *phb; in pci_hp_add_devices() local 117 phb = pci_bus_to_host(bus); in pci_hp_add_devices() 120 if (phb->controller_ops.probe_mode) in pci_hp_add_devices() 121 mode = phb->controller_ops.probe_mode(bus); in pci_hp_add_devices()
|
D | rtas_pci.c | 62 buid = pdn->phb->buid; in rtas_read_config() 113 buid = pdn->phb->buid; in rtas_write_config() 199 unsigned long get_phb_buid(struct device_node *phb) in get_phb_buid() argument 205 if (of_address_to_resource(phb, 0, &r)) in get_phb_buid() 211 struct pci_controller *phb) in phb_set_bus_ranges() argument 221 phb->first_busno = be32_to_cpu(bus_range[0]); in phb_set_bus_ranges() 222 phb->last_busno = be32_to_cpu(bus_range[1]); in phb_set_bus_ranges() 227 int rtas_setup_phb(struct pci_controller *phb) in rtas_setup_phb() argument 229 struct device_node *dev = phb->dn; in rtas_setup_phb() 234 if (phb_set_bus_ranges(dev, phb)) in rtas_setup_phb() [all …]
|
D | io-workarounds.c | 35 struct pci_controller *phb = bus->phb; in iowa_pci_find() local 38 vstart = (unsigned long)phb->io_base_virt; in iowa_pci_find() 39 vend = vstart + phb->pci_io_size - 1; in iowa_pci_find() 46 res = &phb->mem_resources[j]; in iowa_pci_find() 180 void iowa_register_bus(struct pci_controller *phb, struct ppc_pci_io *ops, in iowa_register_bus() argument 184 struct device_node *np = phb->dn; in iowa_register_bus() 195 bus->phb = phb; in iowa_register_bus()
|
D | eeh_dev.c | 51 edev->controller = pdn->phb; in eeh_dev_init() 63 void eeh_dev_phb_init_dynamic(struct pci_controller *phb) in eeh_dev_phb_init_dynamic() argument 66 eeh_phb_pe_create(phb); in eeh_dev_phb_init_dynamic()
|
D | pci_dn.c | 142 pdn->phb = parent->phb; in add_one_dev_pci_data() 279 pdn->phb = hose; in pci_add_device_node_info() 350 pdev = pci_get_domain_bus_and_slot(pdn->phb->global_number, in pci_remove_device_node_info() 488 void pci_devs_phb_init_dynamic(struct pci_controller *phb) in pci_devs_phb_init_dynamic() argument 490 struct device_node *dn = phb->dn; in pci_devs_phb_init_dynamic() 494 pdn = pci_add_device_node_info(phb, dn); in pci_devs_phb_init_dynamic() 498 pdn->phb = phb; in pci_devs_phb_init_dynamic() 499 phb->pci_data = pdn; in pci_devs_phb_init_dynamic() 503 pci_traverse_device_nodes(dn, add_pdn, phb); in pci_devs_phb_init_dynamic() 517 struct pci_controller *phb, *tmp; in pci_devs_phb_init() local [all …]
|
D | pci-common.c | 110 struct pci_controller *phb; in pcibios_alloc_controller() local 112 phb = zalloc_maybe_bootmem(sizeof(struct pci_controller), GFP_KERNEL); in pcibios_alloc_controller() 113 if (phb == NULL) in pcibios_alloc_controller() 116 phb->global_number = get_phb_number(dev); in pcibios_alloc_controller() 117 list_add_tail(&phb->list_node, &hose_list); in pcibios_alloc_controller() 119 phb->dn = dev; in pcibios_alloc_controller() 120 phb->is_dynamic = slab_is_available(); in pcibios_alloc_controller() 128 PHB_SET_NODE(phb, nid); in pcibios_alloc_controller() 131 return phb; in pcibios_alloc_controller() 135 void pcibios_free_controller(struct pci_controller *phb) in pcibios_free_controller() argument [all …]
|
D | eeh_pe.c | 46 static struct eeh_pe *eeh_pe_alloc(struct pci_controller *phb, int type) in eeh_pe_alloc() argument 63 pe->phb = phb; in eeh_pe_alloc() 79 int eeh_phb_pe_create(struct pci_controller *phb) in eeh_phb_pe_create() argument 84 pe = eeh_pe_alloc(phb, EEH_PE_PHB); in eeh_phb_pe_create() 93 pr_debug("EEH: Add PE for PHB#%x\n", phb->global_number); in eeh_phb_pe_create() 157 struct eeh_pe *eeh_phb_pe_get(struct pci_controller *phb) in eeh_phb_pe_get() argument 167 if ((pe->type & EEH_PE_PHB) && pe->phb == phb) in eeh_phb_pe_get() 309 struct eeh_pe *eeh_pe_get(struct pci_controller *phb, in eeh_pe_get() argument 312 struct eeh_pe *root = eeh_phb_pe_get(phb); in eeh_pe_get() 385 pe = eeh_pe_get(pdn->phb, edev->pe_config_addr, config_addr); in eeh_add_to_parent_pe() [all …]
|
D | eeh.c | 182 pdn->phb->global_number, pdn->busno, in eeh_dump_dev_log() 185 pdn->phb->global_number, pdn->busno, in eeh_dump_dev_log() 397 phb_pe = eeh_phb_pe_get(pe->phb); in eeh_phb_check_failure() 400 __func__, pe->phb->global_number); in eeh_phb_check_failure() 424 phb_pe->phb->global_number, eeh_pe_loc_get(phb_pe)); in eeh_phb_check_failure() 561 pe->phb->global_number, pe->addr, in eeh_dev_check_failure() 562 pe->phb->global_number, parent_pe->addr); in eeh_dev_check_failure() 583 __func__, pe->phb->global_number, pe->addr); in eeh_dev_check_failure() 683 __func__, function, pe->phb->global_number, in eeh_pci_enable() 889 pe->phb->global_number, pe->addr); in eeh_pe_refreeze_passed() [all …]
|
/arch/powerpc/platforms/pasemi/ |
D | msi.c | 141 struct pci_controller *phb; in mpic_pasemi_msi_init() local 159 list_for_each_entry(phb, &hose_list, list_node) { in mpic_pasemi_msi_init() 160 WARN_ON(phb->controller_ops.setup_msi_irqs); in mpic_pasemi_msi_init() 161 phb->controller_ops.setup_msi_irqs = pasemi_msi_setup_msi_irqs; in mpic_pasemi_msi_init() 162 phb->controller_ops.teardown_msi_irqs = pasemi_msi_teardown_msi_irqs; in mpic_pasemi_msi_init()
|
/arch/powerpc/platforms/cell/ |
D | spider-pci.c | 69 static int __init spiderpci_pci_setup_chip(struct pci_controller *phb, in spiderpci_pci_setup_chip() argument 99 dummy_page_da = dma_map_single(phb->parent, dummy_page_va, in spiderpci_pci_setup_chip() 101 if (dma_mapping_error(phb->parent, dummy_page_da)) { in spiderpci_pci_setup_chip() 116 struct device_node *np = bus->phb->dn; in spiderpci_iowa_init() 143 if (spiderpci_pci_setup_chip(bus->phb, regs)) in spiderpci_iowa_init()
|
D | setup.c | 117 static int cell_setup_phb(struct pci_controller *phb) in cell_setup_phb() argument 122 int rc = rtas_setup_phb(phb); in cell_setup_phb() 126 phb->controller_ops = cell_pci_controller_ops; in cell_setup_phb() 128 np = phb->dn; in cell_setup_phb() 137 iowa_register_bus(phb, &spiderpci_ops, &spiderpci_iowa_init, in cell_setup_phb()
|
/arch/powerpc/sysdev/ |
D | mpic_u3msi.c | 180 struct pci_controller *phb; in mpic_u3msi_init() local 193 list_for_each_entry(phb, &hose_list, list_node) { in mpic_u3msi_init() 194 WARN_ON(phb->controller_ops.setup_msi_irqs); in mpic_u3msi_init() 195 phb->controller_ops.setup_msi_irqs = u3msi_setup_msi_irqs; in mpic_u3msi_init() 196 phb->controller_ops.teardown_msi_irqs = u3msi_teardown_msi_irqs; in mpic_u3msi_init()
|
/arch/powerpc/platforms/4xx/ |
D | hsta_msi.c | 128 struct pci_controller *phb; in hsta_msi_probe() local 173 list_for_each_entry(phb, &hose_list, list_node) { in hsta_msi_probe() 174 phb->controller_ops.setup_msi_irqs = hsta_setup_msi_irqs; in hsta_msi_probe() 175 phb->controller_ops.teardown_msi_irqs = hsta_teardown_msi_irqs; in hsta_msi_probe()
|
/arch/powerpc/platforms/amigaone/ |
D | setup.c | 70 int phb = -ENODEV; in amigaone_setup_arch() local 74 phb = amigaone_add_bridge(np); in amigaone_setup_arch() 76 BUG_ON(phb != 0); in amigaone_setup_arch()
|