Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 98747770 authored by Stephen Rothwell's avatar Stephen Rothwell Committed by Paul Mackerras
Browse files

[POWERPC] Create and use set_pci_dma_ops



This will allow us to build without PCI easier.

Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 618d3adc
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -70,6 +70,11 @@ int global_phb_number; /* Global phb counter */
struct pci_dev *ppc64_isabridge_dev = NULL;
EXPORT_SYMBOL_GPL(ppc64_isabridge_dev);

void set_pci_dma_ops(struct dma_mapping_ops *dma_ops)
{
	pci_dma_ops = dma_ops;
}

static void fixup_broken_pcnet32(struct pci_dev* dev)
{
	if ((dev->class>>8 == PCI_CLASS_NETWORK_ETHERNET)) {
+2 −2
Original line number Diff line number Diff line
@@ -646,7 +646,7 @@ static int __init cell_iommu_init_disabled(void)
	unsigned long base = 0, size;

	/* When no iommu is present, we use direct DMA ops */
	pci_dma_ops = &dma_direct_ops;
	set_pci_dma_ops(&dma_direct_ops);

	/* First make sure all IOC translation is turned off */
	cell_disable_iommus();
@@ -734,7 +734,7 @@ static int __init cell_iommu_init(void)
	}

	/* Setup default PCI iommu ops */
	pci_dma_ops = &dma_iommu_ops;
	set_pci_dma_ops(&dma_iommu_ops);

 bail:
	/* Register callbacks on OF platform device addition/removal
+1 −1
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ static int __init celleb_init_iommu(void)
		return -ENODEV;

	celleb_init_direct_mapping();
	pci_dma_ops = &dma_direct_ops;
	set_pci_dma_ops(&dma_direct_ops);
	bus_register_notifier(&of_platform_bus_type, &celleb_of_bus_notifier);

	return 0;
+1 −1
Original line number Diff line number Diff line
@@ -194,5 +194,5 @@ void iommu_init_early_iSeries(void)
	ppc_md.tce_build = tce_build_iSeries;
	ppc_md.tce_free  = tce_free_iSeries;

	pci_dma_ops = &dma_iommu_ops;
	set_pci_dma_ops(&dma_iommu_ops);
}
+2 −2
Original line number Diff line number Diff line
@@ -255,7 +255,7 @@ void iommu_init_early_pasemi(void)
		/* 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;
		pci_dma_ops = &dma_direct_ops;
		set_pci_dma_ops(&dma_direct_ops);

		return;
	}
@@ -266,7 +266,7 @@ void iommu_init_early_pasemi(void)
	ppc_md.pci_dma_bus_setup = pci_dma_bus_setup_pasemi;
	ppc_md.tce_build = iobmap_build;
	ppc_md.tce_free  = iobmap_free;
	pci_dma_ops = &dma_iommu_ops;
	set_pci_dma_ops(&dma_iommu_ops);
}

void __init alloc_iobmap_l2(void)
Loading