Commit 046e26a8 authored by David S. Miller's avatar David S. Miller
Browse files

sparc: Remove generic SBUS probing layer.



The individual SBUS IOMMU arch code now sets the IOMMU information
directly into the OF device objects.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5059625e
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -59,6 +59,4 @@ extern __u32 iounit_map_dma_init(struct sbus_bus *, int);
#define iounit_map_dma_finish(sbus, addr, len) mmu_release_scsi_one(addr, len, sbus)
extern __u32 iounit_map_dma_page(__u32, void *, struct sbus_bus *);

extern void iounit_init(struct sbus_bus *sbus);

#endif /* !(_SPARC_IO_UNIT_H) */
+0 −2
Original line number Diff line number Diff line
@@ -118,6 +118,4 @@ static inline void iommu_invalidate_page(struct iommu_regs *regs, unsigned long
	regs->pageflush = (ba & PAGE_MASK);
}

extern void iommu_init(struct device_node *dp, struct sbus_bus *sbus);

#endif /* !(_SPARC_IOMMU_H) */
+0 −1
Original line number Diff line number Diff line
@@ -56,7 +56,6 @@ extern unsigned int sun4u_build_msi(u32 portid, unsigned int *virt_irq_p,
				    unsigned long imap_base,
				    unsigned long iclr_base);
extern void sun4u_destroy_msi(unsigned int virt_irq);
extern unsigned int sbus_build_irq(void *sbus, unsigned int ino);

extern unsigned char virt_irq_alloc(unsigned int dev_handle,
				    unsigned int dev_ino);
+0 −23
Original line number Diff line number Diff line
@@ -377,22 +377,6 @@ void sbus_dma_sync_single_for_device(struct device *dev, dma_addr_t ba, size_t s
{
}

/* Support code for sbus_init().  */
void __init sbus_setup_iommu(struct sbus_bus *sbus, struct device_node *dp)
{
#ifndef CONFIG_SUN4
	struct device_node *parent = dp->parent;

	if (sparc_cpu_model != sun4d &&
	    parent != NULL &&
	    !strcmp(parent->name, "iommu"))
		iommu_init(parent, sbus);

	if (sparc_cpu_model == sun4d)
		iounit_init(sbus);
#endif
}

static int __init sparc_register_ioport(void)
{
	register_proc_sparc_ioport();
@@ -402,13 +386,6 @@ static int __init sparc_register_ioport(void)

arch_initcall(sparc_register_ioport);

void __init sbus_arch_postinit(void)
{
	if (sparc_cpu_model == sun4d) {
		extern void sun4d_init_sbi_irq(void);
		sun4d_init_sbi_irq();
	}
}
#endif /* CONFIG_SBUS */

#ifdef CONFIG_PCI
+20 −10
Original line number Diff line number Diff line
@@ -34,18 +34,10 @@
#define IOPERM        (IOUPTE_CACHE | IOUPTE_WRITE | IOUPTE_VALID)
#define MKIOPTE(phys) __iopte((((phys)>>4) & IOUPTE_PAGE) | IOPERM)

void __init iounit_init(struct sbus_bus *sbus)
static void __init iounit_iommu_init(struct of_device *op)
{
	struct device_node *dp = sbus->ofdev.node;
	struct iounit_struct *iounit;
	iopte_t *xpt, *xptend;
	struct of_device *op;

	op = of_find_device_by_node(dp);
	if (!op) {
		prom_printf("SUN4D: Cannot find SBI of_device.\n");
		prom_halt();
	}

	iounit = kzalloc(sizeof(struct iounit_struct), GFP_ATOMIC);
	if (!iounit) {
@@ -66,7 +58,6 @@ void __init iounit_init(struct sbus_bus *sbus)
		prom_halt();
	}
	
	sbus->ofdev.dev.archdata.iommu = iounit;
	op->dev.archdata.iommu = iounit;
	iounit->page_table = xpt;
	spin_lock_init(&iounit->lock);
@@ -76,6 +67,25 @@ void __init iounit_init(struct sbus_bus *sbus)
	     	iopte_val(*xpt++) = 0;
}

static int __init iounit_init(void)
{
	extern void sun4d_init_sbi_irq(void);
	struct device_node *dp;

	for_each_node_by_name(dp, "sbi") {
		struct of_device *op = of_find_device_by_node(dp);

		iounit_iommu_init(op);
		of_propagate_archdata(op);
	}

	sun4d_init_sbi_irq();

	return 0;
}

subsys_initcall(iounit_init);

/* One has to hold iounit->lock to call this */
static unsigned long iounit_get_area(struct iounit_struct *iounit, unsigned long vaddr, int size)
{
Loading