aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/ioport.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-08-26 01:47:20 -0400
committerDavid S. Miller <davem@davemloft.net>2008-08-29 05:13:11 -0400
commite003934876e75f96f1445565d8c9084c07943253 (patch)
treeef44d634c4c1c98248bf3976a9ab0fa7231fd393 /arch/sparc/kernel/ioport.c
parent334ae614772b1147435dce9be3911f9040dff0d9 (diff)
sparc32: Make IOMMU and IO-UNIT init work with device nodes.
And stick the iommu archdata pointer into the generic OF device tree of_device struct as well. We still have to pass the sbus_bus object down into the routines so that the SBUS bus objects get the iommu cookies set properly. After drivers get converted to being pure OF drivers, that can go away. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/ioport.c')
-rw-r--r--arch/sparc/kernel/ioport.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c
index 2a8a847764d..f6158c4a399 100644
--- a/arch/sparc/kernel/ioport.c
+++ b/arch/sparc/kernel/ioport.c
@@ -46,6 +46,8 @@
46#include <asm/page.h> 46#include <asm/page.h>
47#include <asm/pgalloc.h> 47#include <asm/pgalloc.h>
48#include <asm/dma.h> 48#include <asm/dma.h>
49#include <asm/iommu.h>
50#include <asm/io-unit.h>
49 51
50#define mmu_inval_dma_area(p, l) /* Anton pulled it out for 2.4.0-xx */ 52#define mmu_inval_dma_area(p, l) /* Anton pulled it out for 2.4.0-xx */
51 53
@@ -515,18 +517,11 @@ void __init sbus_setup_iommu(struct sbus_bus *sbus, struct device_node *dp)
515 517
516 if (sparc_cpu_model != sun4d && 518 if (sparc_cpu_model != sun4d &&
517 parent != NULL && 519 parent != NULL &&
518 !strcmp(parent->name, "iommu")) { 520 !strcmp(parent->name, "iommu"))
519 extern void iommu_init(int iommu_node, struct sbus_bus *sbus); 521 iommu_init(parent, sbus);
520 522
521 iommu_init(parent->node, sbus); 523 if (sparc_cpu_model == sun4d)
522 } 524 iounit_init(sbus);
523
524 if (sparc_cpu_model == sun4d) {
525 extern void iounit_init(int sbi_node, int iounit_node,
526 struct sbus_bus *sbus);
527
528 iounit_init(dp->node, parent->node, sbus);
529 }
530#endif 525#endif
531} 526}
532 527