Lines Matching refs:pdn
733 struct device_node *dn, *pdn; in pci_dma_bus_setup_pSeriesLP() local
742 pdn = pci_dma_find(dn, &dma_window); in pci_dma_bus_setup_pSeriesLP()
747 ppci = PCI_DN(pdn); in pci_dma_bus_setup_pSeriesLP()
750 pdn, ppci->table_group); in pci_dma_bus_setup_pSeriesLP()
756 iommu_table_setparms_lpar(ppci->phb, pdn, tbl, in pci_dma_bus_setup_pSeriesLP()
898 static bool find_existing_ddw(struct device_node *pdn, u64 *dma_addr, int *window_shift) in find_existing_ddw() argument
907 if (window->device == pdn) { in find_existing_ddw()
920 static struct dma_win *ddw_list_new_entry(struct device_node *pdn, in ddw_list_new_entry() argument
929 window->device = pdn; in ddw_list_new_entry()
938 struct device_node *pdn; in find_existing_ddw_windows_named() local
942 for_each_node_with_property(pdn, name) { in find_existing_ddw_windows_named()
943 dma64 = of_get_property(pdn, name, &len); in find_existing_ddw_windows_named()
945 remove_ddw(pdn, true, name); in find_existing_ddw_windows_named()
949 window = ddw_list_new_entry(pdn, dma64); in find_existing_ddw_windows_named()
951 of_node_put(pdn); in find_existing_ddw_windows_named()
1014 struct pci_dn *pdn; in query_ddw() local
1037 pdn = PCI_DN(dn); in query_ddw()
1038 buid = pdn->phb->buid; in query_ddw()
1039 cfg_addr = ((pdn->busno << 16) | (pdn->devfn << 8)); in query_ddw()
1073 struct pci_dn *pdn; in create_ddw() local
1085 pdn = PCI_DN(dn); in create_ddw()
1086 buid = pdn->phb->buid; in create_ddw()
1087 cfg_addr = ((pdn->busno << 16) | (pdn->devfn << 8)); in create_ddw()
1106 struct device_node *pdn; member
1152 struct pci_dn *pdn; in reset_dma_window() local
1159 pdn = PCI_DN(dn); in reset_dma_window()
1160 buid = pdn->phb->buid; in reset_dma_window()
1161 cfg_addr = (pdn->busno << 16) | (pdn->devfn << 8); in reset_dma_window()
1239 static bool enable_ddw(struct pci_dev *dev, struct device_node *pdn) in enable_ddw() argument
1255 struct pci_dn *pci = PCI_DN(pdn); in enable_ddw()
1264 if (find_existing_ddw(pdn, &dev->dev.archdata.dma_offset, &len)) { in enable_ddw()
1277 if (fpdn->pdn == pdn) in enable_ddw()
1289 ret = of_property_read_u32_array(pdn, "ibm,ddw-applicable", in enable_ddw()
1301 ret = query_ddw(dev, ddw_avail, &query, pdn); in enable_ddw()
1321 default_win = of_find_property(pdn, "ibm,dma-window", NULL); in enable_ddw()
1325 reset_win_ext = ddw_read_ext(pdn, DDW_EXT_RESET_DMA_WIN, NULL); in enable_ddw()
1329 remove_dma_window(pdn, ddw_avail, default_win); in enable_ddw()
1333 ret = query_ddw(dev, ddw_avail, &query, pdn); in enable_ddw()
1400 ret = of_add_property(pdn, win64); in enable_ddw()
1403 pdn, ret); in enable_ddw()
1407 window = ddw_list_new_entry(pdn, win64->value); in enable_ddw()
1420 clean_dma_window(pdn, win64->value); in enable_ddw()
1460 of_remove_property(pdn, default_win); in enable_ddw()
1461 dev_info(&dev->dev, "Removed default DMA window for %pOF\n", pdn); in enable_ddw()
1475 of_remove_property(pdn, win64); in enable_ddw()
1484 __remove_dma_window(pdn, ddw_avail, create.liobn); in enable_ddw()
1488 reset_dma_window(dev, pdn); in enable_ddw()
1493 fpdn->pdn = pdn; in enable_ddw()
1512 struct device_node *pdn, *dn; in pci_dma_dev_setup_pSeriesLP() local
1528 pdn = pci_dma_find(dn, &dma_window); in pci_dma_dev_setup_pSeriesLP()
1529 if (!pdn || !PCI_DN(pdn)) { in pci_dma_dev_setup_pSeriesLP()
1535 pr_debug(" parent is %pOF\n", pdn); in pci_dma_dev_setup_pSeriesLP()
1537 pci = PCI_DN(pdn); in pci_dma_dev_setup_pSeriesLP()
1541 iommu_table_setparms_lpar(pci->phb, pdn, tbl, in pci_dma_dev_setup_pSeriesLP()
1558 struct device_node *dn = pci_device_to_OF_node(pdev), *pdn; in iommu_bypass_supported_pSeriesLP() local
1572 pdn = pci_dma_find(dn, NULL); in iommu_bypass_supported_pSeriesLP()
1573 if (pdn && PCI_DN(pdn)) in iommu_bypass_supported_pSeriesLP()
1574 return enable_ddw(pdev, pdn); in iommu_bypass_supported_pSeriesLP()