mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 16:37:50 +00:00
powerpc/pasemi: Clean up pasemi iommu table initializations
No need for empty helpers with iommu off, the ppc_md hooks are optional. The direct_dma_ops are the default pci_dma_ops, so no need to set in the them iommu off case. No need to set the device tree device_node pci node iommu pointer, its only used for dlpar remove. Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Acked-by: Olof Johansson <olof@lixom.net> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
6d283d782f
commit
2f9c9be2ff
1 changed files with 1 additions and 18 deletions
|
@ -156,20 +156,12 @@ static void iommu_table_iobmap_setup(void)
|
||||||
|
|
||||||
static void pci_dma_bus_setup_pasemi(struct pci_bus *bus)
|
static void pci_dma_bus_setup_pasemi(struct pci_bus *bus)
|
||||||
{
|
{
|
||||||
struct device_node *dn;
|
|
||||||
|
|
||||||
pr_debug("pci_dma_bus_setup, bus %p, bus->self %p\n", bus, bus->self);
|
pr_debug("pci_dma_bus_setup, bus %p, bus->self %p\n", bus, bus->self);
|
||||||
|
|
||||||
if (!iommu_table_iobmap_inited) {
|
if (!iommu_table_iobmap_inited) {
|
||||||
iommu_table_iobmap_inited = 1;
|
iommu_table_iobmap_inited = 1;
|
||||||
iommu_table_iobmap_setup();
|
iommu_table_iobmap_setup();
|
||||||
}
|
}
|
||||||
|
|
||||||
dn = pci_bus_to_OF_node(bus);
|
|
||||||
|
|
||||||
if (dn)
|
|
||||||
PCI_DN(dn)->iommu_table = &iommu_table_iobmap;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -192,9 +184,6 @@ static void pci_dma_dev_setup_pasemi(struct pci_dev *dev)
|
||||||
set_iommu_table_base(&dev->dev, &iommu_table_iobmap);
|
set_iommu_table_base(&dev->dev, &iommu_table_iobmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pci_dma_bus_setup_null(struct pci_bus *b) { }
|
|
||||||
static void pci_dma_dev_setup_null(struct pci_dev *d) { }
|
|
||||||
|
|
||||||
int __init iob_init(struct device_node *dn)
|
int __init iob_init(struct device_node *dn)
|
||||||
{
|
{
|
||||||
unsigned long tmp;
|
unsigned long tmp;
|
||||||
|
@ -251,14 +240,8 @@ void __init iommu_init_early_pasemi(void)
|
||||||
iommu_off = of_chosen &&
|
iommu_off = of_chosen &&
|
||||||
of_get_property(of_chosen, "linux,iommu-off", NULL);
|
of_get_property(of_chosen, "linux,iommu-off", NULL);
|
||||||
#endif
|
#endif
|
||||||
if (iommu_off) {
|
if (iommu_off)
|
||||||
/* Direct I/O, IOMMU off */
|
|
||||||
ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_null;
|
|
||||||
ppc_md.pci_dma_bus_setup = pci_dma_bus_setup_null;
|
|
||||||
set_pci_dma_ops(&dma_direct_ops);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
iob_init(NULL);
|
iob_init(NULL);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue