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>
This commit is contained in:
@ -46,6 +46,8 @@
|
||||
#include <asm/page.h>
|
||||
#include <asm/pgalloc.h>
|
||||
#include <asm/dma.h>
|
||||
#include <asm/iommu.h>
|
||||
#include <asm/io-unit.h>
|
||||
|
||||
#define mmu_inval_dma_area(p, l) /* Anton pulled it out for 2.4.0-xx */
|
||||
|
||||
@ -515,18 +517,11 @@ void __init sbus_setup_iommu(struct sbus_bus *sbus, struct device_node *dp)
|
||||
|
||||
if (sparc_cpu_model != sun4d &&
|
||||
parent != NULL &&
|
||||
!strcmp(parent->name, "iommu")) {
|
||||
extern void iommu_init(int iommu_node, struct sbus_bus *sbus);
|
||||
!strcmp(parent->name, "iommu"))
|
||||
iommu_init(parent, sbus);
|
||||
|
||||
iommu_init(parent->node, sbus);
|
||||
}
|
||||
|
||||
if (sparc_cpu_model == sun4d) {
|
||||
extern void iounit_init(int sbi_node, int iounit_node,
|
||||
struct sbus_bus *sbus);
|
||||
|
||||
iounit_init(dp->node, parent->node, sbus);
|
||||
}
|
||||
if (sparc_cpu_model == sun4d)
|
||||
iounit_init(sbus);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user