Lines Matching refs:pci

20 #include <linux/pci.h>
32 #include <asm/pci-bridge.h>
36 #include <asm/ppc-pci.h>
589 struct pci_dn *pci;
602 pci = PCI_DN(dn);
628 pci->phb->dma_window_size = 0x80000000ul; /* To be divided */
630 while (pci->phb->dma_window_size * children > 0x80000000ul)
631 pci->phb->dma_window_size >>= 1;
633 pci->phb->dma_window_size);
634 pci->phb->dma_window_base_cur = 0;
644 pci->phb->dma_window_size = 0x8000000ul;
645 pci->phb->dma_window_base_cur = 0x8000000ul;
647 pci->table_group = iommu_pseries_alloc_group(pci->phb->node);
648 tbl = pci->table_group->tables[0];
650 iommu_table_setparms(pci->phb, dn, tbl);
652 if (!iommu_init_table(tbl, pci->phb->node, 0, 0))
656 pci->phb->dma_window_size = 0x80000000ul;
657 while (pci->phb->dma_window_size * children > 0x70000000ul)
658 pci->phb->dma_window_size >>= 1;
660 pr_debug("ISA/IDE, window size is 0x%llx\n", pci->phb->dma_window_size);
1105 * Retrieve them from the pci device, not the node with the
1153 * Retrieve them from the pci device, not the node with the
1294 * dev: the pci device we are checking
1316 struct pci_dn *pci = PCI_DN(pdn);
1375 if (iommu_table_in_use(pci->table_group->tables[0])) {
1491 for (i = 0; i < ARRAY_SIZE(pci->phb->mem_resources); i++) {
1495 if ((pci->phb->mem_resources[i].flags & mask) == IORESOURCE_MEM) {
1496 start = pci->phb->mem_resources[i].start;
1497 end = pci->phb->mem_resources[i].end;
1503 newtbl = iommu_pseries_alloc_table(pci->phb->node);
1509 iommu_table_setparms_common(newtbl, pci->phb->bus->number, create.liobn, win_addr,
1511 iommu_init_table(newtbl, pci->phb->node, start, end);
1513 pci->table_group->tables[1] = newtbl;
1519 iommu_tce_table_put(pci->table_group->tables[0]);
1520 pci->table_group->tables[0] = NULL;
1577 struct pci_dn *pci;
1594 "no DMA window found for pci dev=%s dn=%pOF\n",
1600 pci = PCI_DN(pdn);
1601 if (!pci->table_group) {
1602 pci->table_group = iommu_pseries_alloc_group(pci->phb->node);
1603 tbl = pci->table_group->tables[0];
1605 iommu_table_setparms_common(tbl, pci->phb->bus->number,
1616 pci->table_group->tce32_start = be64_to_cpu(prop.dma_base);
1617 pci->table_group->tce32_size = 1 << be32_to_cpu(prop.window_shift);
1619 iommu_init_table(tbl, pci->phb->node, 0, 0);
1620 iommu_register_group(pci->table_group,
1621 pci_domain_nr(pci->phb->bus), 0);
1622 pr_debug(" created table: %p\n", pci->table_group);
1624 pr_debug(" found DMA window, table: %p\n", pci->table_group);
1627 set_iommu_table_base(&dev->dev, pci->table_group->tables[0]);
1628 iommu_add_device(pci->table_group, &dev->dev);
1703 struct pci_dn *pci = PCI_DN(np);
1718 if (pci && pci->table_group)
1719 iommu_pseries_free_group(pci->table_group,
1788 struct pci_dn *pci;
1794 pci = PCI_DN(pdn);
1795 if (!pci->table_group)
1798 grp = pci->table_group->group;