diff options
author | Nishanth Aravamudan <nacc@us.ibm.com> | 2010-10-18 03:27:00 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-11-28 23:48:20 -0500 |
commit | 2f9c9be2ff31670c942572cf96eb6c696362b584 (patch) | |
tree | 0fc6fc9d9d0ddb0d4e8fa75fabb654cd12069737 /arch/powerpc/platforms/pasemi | |
parent | 6d283d782f9fbafee5c672bfdaff4c10f6fdc788 (diff) |
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>
Diffstat (limited to 'arch/powerpc/platforms/pasemi')
-rw-r--r-- | arch/powerpc/platforms/pasemi/iommu.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/arch/powerpc/platforms/pasemi/iommu.c b/arch/powerpc/platforms/pasemi/iommu.c index 1f9fb2c57761..14943ef01918 100644 --- a/arch/powerpc/platforms/pasemi/iommu.c +++ b/arch/powerpc/platforms/pasemi/iommu.c | |||
@@ -156,20 +156,12 @@ static void iommu_table_iobmap_setup(void) | |||
156 | 156 | ||
157 | static void pci_dma_bus_setup_pasemi(struct pci_bus *bus) | 157 | static void pci_dma_bus_setup_pasemi(struct pci_bus *bus) |
158 | { | 158 | { |
159 | struct device_node *dn; | ||
160 | |||
161 | pr_debug("pci_dma_bus_setup, bus %p, bus->self %p\n", bus, bus->self); | 159 | pr_debug("pci_dma_bus_setup, bus %p, bus->self %p\n", bus, bus->self); |
162 | 160 | ||
163 | if (!iommu_table_iobmap_inited) { | 161 | if (!iommu_table_iobmap_inited) { |
164 | iommu_table_iobmap_inited = 1; | 162 | iommu_table_iobmap_inited = 1; |
165 | iommu_table_iobmap_setup(); | 163 | iommu_table_iobmap_setup(); |
166 | } | 164 | } |
167 | |||
168 | dn = pci_bus_to_OF_node(bus); | ||
169 | |||
170 | if (dn) | ||
171 | PCI_DN(dn)->iommu_table = &iommu_table_iobmap; | ||
172 | |||
173 | } | 165 | } |
174 | 166 | ||
175 | 167 | ||
@@ -192,9 +184,6 @@ static void pci_dma_dev_setup_pasemi(struct pci_dev *dev) | |||
192 | set_iommu_table_base(&dev->dev, &iommu_table_iobmap); | 184 | set_iommu_table_base(&dev->dev, &iommu_table_iobmap); |
193 | } | 185 | } |
194 | 186 | ||
195 | static void pci_dma_bus_setup_null(struct pci_bus *b) { } | ||
196 | static void pci_dma_dev_setup_null(struct pci_dev *d) { } | ||
197 | |||
198 | int __init iob_init(struct device_node *dn) | 187 | int __init iob_init(struct device_node *dn) |
199 | { | 188 | { |
200 | unsigned long tmp; | 189 | unsigned long tmp; |
@@ -251,14 +240,8 @@ void __init iommu_init_early_pasemi(void) | |||
251 | iommu_off = of_chosen && | 240 | iommu_off = of_chosen && |
252 | of_get_property(of_chosen, "linux,iommu-off", NULL); | 241 | of_get_property(of_chosen, "linux,iommu-off", NULL); |
253 | #endif | 242 | #endif |
254 | if (iommu_off) { | 243 | if (iommu_off) |
255 | /* Direct I/O, IOMMU off */ | ||
256 | ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_null; | ||
257 | ppc_md.pci_dma_bus_setup = pci_dma_bus_setup_null; | ||
258 | set_pci_dma_ops(&dma_direct_ops); | ||
259 | |||
260 | return; | 244 | return; |
261 | } | ||
262 | 245 | ||
263 | iob_init(NULL); | 246 | iob_init(NULL); |
264 | 247 | ||