sparc32: Move sun4d show_leds() out of asm/obio.h
[safe/jmp/linux-2.6] / arch / sparc / kernel / ioport.c
index 0e47830..4f025b3 100644 (file)
@@ -42,7 +42,6 @@
 #include <asm/vaddrs.h>
 #include <asm/oplib.h>
 #include <asm/prom.h>
-#include <asm/sbus.h>
 #include <asm/page.h>
 #include <asm/pgalloc.h>
 #include <asm/dma.h>
@@ -143,15 +142,6 @@ void iounmap(volatile void __iomem *virtual)
        }
 }
 
-/*
- */
-void __iomem *sbus_ioremap(struct resource *phyres, unsigned long offset,
-    unsigned long size, char *name)
-{
-       return _sparc_alloc_io(phyres->flags & 0xF,
-           phyres->start + offset, size, name);
-}
-
 void __iomem *of_ioremap(struct resource *res, unsigned long offset,
                         unsigned long size, char *name)
 {
@@ -168,13 +158,6 @@ void of_iounmap(struct resource *res, void __iomem *base, unsigned long size)
 EXPORT_SYMBOL(of_iounmap);
 
 /*
- */
-void sbus_iounmap(volatile void __iomem *addr, unsigned long size)
-{
-       iounmap(addr);
-}
-
-/*
  * Meat of mapping
  */
 static void __iomem *_sparc_alloc_io(unsigned int busno, unsigned long phys,
@@ -393,71 +376,15 @@ void sbus_dma_sync_single_for_device(struct device *dev, dma_addr_t ba, size_t s
 {
 }
 
-/* Support code for sbus_init().  */
-/*
- * XXX This functions appears to be a distorted version of
- * prom_sbus_ranges_init(), with all sun4d stuff cut away.
- * Ask DaveM what is going on here, how is sun4d supposed to work... XXX
- */
-/* added back sun4d patch from Thomas Bogendoerfer - should be OK (crn) */
-void __init sbus_arch_bus_ranges_init(struct device_node *pn, struct sbus_bus *sbus)
-{
-       int parent_node = pn->node;
-
-       if (sparc_cpu_model == sun4d) {
-               struct linux_prom_ranges iounit_ranges[PROMREG_MAX];
-               int num_iounit_ranges, len;
-
-               len = prom_getproperty(parent_node, "ranges",
-                                      (char *) iounit_ranges,
-                                      sizeof (iounit_ranges));
-               if (len != -1) {
-                       num_iounit_ranges =
-                               (len / sizeof(struct linux_prom_ranges));
-                       prom_adjust_ranges(sbus->sbus_ranges,
-                                          sbus->num_sbus_ranges,
-                                          iounit_ranges, num_iounit_ranges);
-               }
-       }
-}
-
-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
-}
-
-int __init sbus_arch_preinit(void)
+static int __init sparc_register_ioport(void)
 {
        register_proc_sparc_ioport();
 
-#ifdef CONFIG_SUN4
-       {
-               extern void sun4_dvma_init(void);
-               sun4_dvma_init();
-       }
-       return 1;
-#else
        return 0;
-#endif
 }
 
-void __init sbus_arch_postinit(void)
-{
-       if (sparc_cpu_model == sun4d) {
-               extern void sun4d_init_sbi_irq(void);
-               sun4d_init_sbi_irq();
-       }
-}
+arch_initcall(sparc_register_ioport);
+
 #endif /* CONFIG_SBUS */
 
 #ifdef CONFIG_PCI