diff options
author | David Howells <dhowells@redhat.com> | 2006-12-05 12:01:28 -0500 |
---|---|---|
committer | David Howells <dhowells@warthog.cambridge.redhat.com> | 2006-12-05 12:01:28 -0500 |
commit | 9db73724453a9350e1c22dbe732d427e2939a5c9 (patch) | |
tree | 15e3ead6413ae97398a54292acc199bee0864d42 /arch/powerpc/sysdev/dart_iommu.c | |
parent | 4c1ac1b49122b805adfa4efc620592f68dccf5db (diff) | |
parent | e62438630ca37539c8cc1553710bbfaa3cf960a7 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
drivers/ata/libata-scsi.c
include/linux/libata.h
Futher merge of Linus's head and compilation fixups.
Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'arch/powerpc/sysdev/dart_iommu.c')
-rw-r--r-- | arch/powerpc/sysdev/dart_iommu.c | 34 |
1 files changed, 9 insertions, 25 deletions
diff --git a/arch/powerpc/sysdev/dart_iommu.c b/arch/powerpc/sysdev/dart_iommu.c index 572b7846cc77..1488535b0e13 100644 --- a/arch/powerpc/sysdev/dart_iommu.c +++ b/arch/powerpc/sysdev/dart_iommu.c | |||
@@ -48,9 +48,6 @@ | |||
48 | 48 | ||
49 | #include "dart.h" | 49 | #include "dart.h" |
50 | 50 | ||
51 | extern int iommu_is_off; | ||
52 | extern int iommu_force_on; | ||
53 | |||
54 | /* Physical base address and size of the DART table */ | 51 | /* Physical base address and size of the DART table */ |
55 | unsigned long dart_tablebase; /* exported to htab_initialize */ | 52 | unsigned long dart_tablebase; /* exported to htab_initialize */ |
56 | static unsigned long dart_tablesize; | 53 | static unsigned long dart_tablesize; |
@@ -289,24 +286,15 @@ static void iommu_table_dart_setup(void) | |||
289 | set_bit(iommu_table_dart.it_size - 1, iommu_table_dart.it_map); | 286 | set_bit(iommu_table_dart.it_size - 1, iommu_table_dart.it_map); |
290 | } | 287 | } |
291 | 288 | ||
292 | static void iommu_dev_setup_dart(struct pci_dev *dev) | 289 | static void pci_dma_dev_setup_dart(struct pci_dev *dev) |
293 | { | 290 | { |
294 | struct device_node *dn; | ||
295 | |||
296 | /* We only have one iommu table on the mac for now, which makes | 291 | /* We only have one iommu table on the mac for now, which makes |
297 | * things simple. Setup all PCI devices to point to this table | 292 | * things simple. Setup all PCI devices to point to this table |
298 | * | ||
299 | * We must use pci_device_to_OF_node() to make sure that | ||
300 | * we get the real "final" pointer to the device in the | ||
301 | * pci_dev sysdata and not the temporary PHB one | ||
302 | */ | 293 | */ |
303 | dn = pci_device_to_OF_node(dev); | 294 | dev->dev.archdata.dma_data = &iommu_table_dart; |
304 | |||
305 | if (dn) | ||
306 | PCI_DN(dn)->iommu_table = &iommu_table_dart; | ||
307 | } | 295 | } |
308 | 296 | ||
309 | static void iommu_bus_setup_dart(struct pci_bus *bus) | 297 | static void pci_dma_bus_setup_dart(struct pci_bus *bus) |
310 | { | 298 | { |
311 | struct device_node *dn; | 299 | struct device_node *dn; |
312 | 300 | ||
@@ -321,9 +309,6 @@ static void iommu_bus_setup_dart(struct pci_bus *bus) | |||
321 | PCI_DN(dn)->iommu_table = &iommu_table_dart; | 309 | PCI_DN(dn)->iommu_table = &iommu_table_dart; |
322 | } | 310 | } |
323 | 311 | ||
324 | static void iommu_dev_setup_null(struct pci_dev *dev) { } | ||
325 | static void iommu_bus_setup_null(struct pci_bus *bus) { } | ||
326 | |||
327 | void iommu_init_early_dart(void) | 312 | void iommu_init_early_dart(void) |
328 | { | 313 | { |
329 | struct device_node *dn; | 314 | struct device_node *dn; |
@@ -344,22 +329,21 @@ void iommu_init_early_dart(void) | |||
344 | 329 | ||
345 | /* Initialize the DART HW */ | 330 | /* Initialize the DART HW */ |
346 | if (dart_init(dn) == 0) { | 331 | if (dart_init(dn) == 0) { |
347 | ppc_md.iommu_dev_setup = iommu_dev_setup_dart; | 332 | ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_dart; |
348 | ppc_md.iommu_bus_setup = iommu_bus_setup_dart; | 333 | ppc_md.pci_dma_bus_setup = pci_dma_bus_setup_dart; |
349 | 334 | ||
350 | /* Setup pci_dma ops */ | 335 | /* Setup pci_dma ops */ |
351 | pci_iommu_init(); | 336 | pci_dma_ops = &dma_iommu_ops; |
352 | |||
353 | return; | 337 | return; |
354 | } | 338 | } |
355 | 339 | ||
356 | bail: | 340 | bail: |
357 | /* If init failed, use direct iommu and null setup functions */ | 341 | /* If init failed, use direct iommu and null setup functions */ |
358 | ppc_md.iommu_dev_setup = iommu_dev_setup_null; | 342 | ppc_md.pci_dma_dev_setup = NULL; |
359 | ppc_md.iommu_bus_setup = iommu_bus_setup_null; | 343 | ppc_md.pci_dma_bus_setup = NULL; |
360 | 344 | ||
361 | /* Setup pci_dma ops */ | 345 | /* Setup pci_dma ops */ |
362 | pci_direct_iommu_init(); | 346 | pci_dma_ops = &dma_direct_ops; |
363 | } | 347 | } |
364 | 348 | ||
365 | 349 | ||