Lines Matching refs:pdn
707 struct device_node *dn, *pdn; in pci_dma_bus_setup_pSeriesLP() local
720 for (pdn = dn; pdn != NULL; pdn = pdn->parent) { in pci_dma_bus_setup_pSeriesLP()
721 dma_window = of_get_property(pdn, "ibm,dma-window", NULL); in pci_dma_bus_setup_pSeriesLP()
731 ppci = PCI_DN(pdn); in pci_dma_bus_setup_pSeriesLP()
734 pdn, ppci->table_group); in pci_dma_bus_setup_pSeriesLP()
739 iommu_table_setparms_lpar(ppci->phb, pdn, tbl, in pci_dma_bus_setup_pSeriesLP()
880 static bool find_existing_ddw(struct device_node *pdn, u64 *dma_addr, int *window_shift) in find_existing_ddw() argument
889 if (window->device == pdn) { in find_existing_ddw()
902 static struct dma_win *ddw_list_new_entry(struct device_node *pdn, in ddw_list_new_entry() argument
911 window->device = pdn; in ddw_list_new_entry()
920 struct device_node *pdn; in find_existing_ddw_windows_named() local
924 for_each_node_with_property(pdn, name) { in find_existing_ddw_windows_named()
925 dma64 = of_get_property(pdn, name, &len); in find_existing_ddw_windows_named()
927 remove_ddw(pdn, true, name); in find_existing_ddw_windows_named()
931 window = ddw_list_new_entry(pdn, dma64); in find_existing_ddw_windows_named()
933 of_node_put(pdn); in find_existing_ddw_windows_named()
996 struct pci_dn *pdn; in query_ddw() local
1019 pdn = PCI_DN(dn); in query_ddw()
1020 buid = pdn->phb->buid; in query_ddw()
1021 cfg_addr = ((pdn->busno << 16) | (pdn->devfn << 8)); in query_ddw()
1053 struct pci_dn *pdn; in create_ddw() local
1065 pdn = PCI_DN(dn); in create_ddw()
1066 buid = pdn->phb->buid; in create_ddw()
1067 cfg_addr = ((pdn->busno << 16) | (pdn->devfn << 8)); in create_ddw()
1086 struct device_node *pdn; member
1132 struct pci_dn *pdn; in reset_dma_window() local
1139 pdn = PCI_DN(dn); in reset_dma_window()
1140 buid = pdn->phb->buid; in reset_dma_window()
1141 cfg_addr = (pdn->busno << 16) | (pdn->devfn << 8); in reset_dma_window()
1219 static bool enable_ddw(struct pci_dev *dev, struct device_node *pdn) in enable_ddw() argument
1235 struct pci_dn *pci = PCI_DN(pdn); in enable_ddw()
1244 if (find_existing_ddw(pdn, &dev->dev.archdata.dma_offset, &len)) { in enable_ddw()
1257 if (fpdn->pdn == pdn) in enable_ddw()
1269 ret = of_property_read_u32_array(pdn, "ibm,ddw-applicable", in enable_ddw()
1281 ret = query_ddw(dev, ddw_avail, &query, pdn); in enable_ddw()
1302 default_win = of_find_property(pdn, "ibm,dma-window", NULL); in enable_ddw()
1306 reset_win_ext = ddw_read_ext(pdn, DDW_EXT_RESET_DMA_WIN, NULL); in enable_ddw()
1310 remove_dma_window(pdn, ddw_avail, default_win); in enable_ddw()
1314 ret = query_ddw(dev, ddw_avail, &query, pdn); in enable_ddw()
1381 ret = of_add_property(pdn, win64); in enable_ddw()
1384 pdn, ret); in enable_ddw()
1388 window = ddw_list_new_entry(pdn, win64->value); in enable_ddw()
1401 clean_dma_window(pdn, win64->value); in enable_ddw()
1454 of_remove_property(pdn, win64); in enable_ddw()
1463 __remove_dma_window(pdn, ddw_avail, create.liobn); in enable_ddw()
1467 reset_dma_window(dev, pdn); in enable_ddw()
1472 fpdn->pdn = pdn; in enable_ddw()
1491 struct device_node *pdn, *dn; in pci_dma_dev_setup_pSeriesLP() local
1507 for (pdn = dn; pdn && PCI_DN(pdn) && !PCI_DN(pdn)->table_group; in pci_dma_dev_setup_pSeriesLP()
1508 pdn = pdn->parent) { in pci_dma_dev_setup_pSeriesLP()
1509 dma_window = of_get_property(pdn, "ibm,dma-window", NULL); in pci_dma_dev_setup_pSeriesLP()
1514 if (!pdn || !PCI_DN(pdn)) { in pci_dma_dev_setup_pSeriesLP()
1520 pr_debug(" parent is %pOF\n", pdn); in pci_dma_dev_setup_pSeriesLP()
1522 pci = PCI_DN(pdn); in pci_dma_dev_setup_pSeriesLP()
1526 iommu_table_setparms_lpar(pci->phb, pdn, tbl, in pci_dma_dev_setup_pSeriesLP()
1543 struct device_node *dn = pci_device_to_OF_node(pdev), *pdn; in iommu_bypass_supported_pSeriesLP() local
1558 for (pdn = dn; pdn && PCI_DN(pdn) && !PCI_DN(pdn)->table_group; in iommu_bypass_supported_pSeriesLP()
1559 pdn = pdn->parent) { in iommu_bypass_supported_pSeriesLP()
1560 dma_window = of_get_property(pdn, "ibm,dma-window", NULL); in iommu_bypass_supported_pSeriesLP()
1565 if (pdn && PCI_DN(pdn)) in iommu_bypass_supported_pSeriesLP()
1566 return enable_ddw(pdev, pdn); in iommu_bypass_supported_pSeriesLP()