fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / arch / mips / mips-boards / malta / malta_setup.c
index 72a16bf..56ea766 100644 (file)
  *  with this program; if not, write to the Free Software Foundation, Inc.,
  *  59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
  */
-#include <linux/config.h>
 #include <linux/init.h>
 #include <linux/sched.h>
 #include <linux/ioport.h>
 #include <linux/pci.h>
-#include <linux/tty.h>
+#include <linux/screen_info.h>
 
 #include <asm/cpu.h>
 #include <asm/bootinfo.h>
@@ -38,7 +37,6 @@
 
 extern void mips_reboot_setup(void);
 extern void mips_time_init(void);
-extern void mips_timer_setup(struct irqaction *irq);
 extern unsigned long mips_rtc_get_time(void);
 
 #ifdef CONFIG_KGDB
@@ -46,11 +44,11 @@ extern void kgdb_config(void);
 #endif
 
 struct resource standard_io_resources[] = {
-       { "dma1", 0x00, 0x1f, IORESOURCE_BUSY },
-       { "timer", 0x40, 0x5f, IORESOURCE_BUSY },
-       { "keyboard", 0x60, 0x6f, IORESOURCE_BUSY },
-       { "dma page reg", 0x80, 0x8f, IORESOURCE_BUSY },
-       { "dma2", 0xc0, 0xdf, IORESOURCE_BUSY },
+       { .name = "dma1", .start = 0x00, .end = 0x1f, .flags = IORESOURCE_BUSY },
+       { .name = "timer", .start = 0x40, .end = 0x5f, .flags = IORESOURCE_BUSY },
+       { .name = "keyboard", .start = 0x60, .end = 0x6f, .flags = IORESOURCE_BUSY },
+       { .name = "dma page reg", .start = 0x80, .end = 0x8f, .flags = IORESOURCE_BUSY },
+       { .name = "dma2", .start = 0xc0, .end = 0xdf, .flags = IORESOURCE_BUSY },
 };
 
 const char *get_system_type(void)
@@ -80,10 +78,12 @@ void __init fd_activate(void)
 }
 #endif
 
-static int __init malta_setup(void)
+void __init plat_mem_setup(void)
 {
        unsigned int i;
 
+       mips_pcibios_init();
+
        /* Request I/O space for devices used on the Malta board. */
        for (i = 0; i < ARRAY_SIZE(standard_io_resources); i++)
                request_resource(&ioport_resource, standard_io_resources+i);
@@ -118,27 +118,27 @@ static int __init malta_setup(void)
                        argptr = prom_getcmdline();
                        if (strstr(argptr, "iobcuncached")) {
                                BONITO_PCICACHECTRL &= ~BONITO_PCICACHECTRL_IOBCCOH_EN;
-                               BONITO_PCIMEMBASECFG = BONITO_PCIMEMBASECFG & 
+                               BONITO_PCIMEMBASECFG = BONITO_PCIMEMBASECFG &
                                        ~(BONITO_PCIMEMBASECFG_MEMBASE0_CACHED |
                                          BONITO_PCIMEMBASECFG_MEMBASE1_CACHED);
                                printk("Disabled Bonito IOBC coherency\n");
                        }
                        else {
                                BONITO_PCICACHECTRL |= BONITO_PCICACHECTRL_IOBCCOH_EN;
-                               BONITO_PCIMEMBASECFG |= 
-                                       (BONITO_PCIMEMBASECFG_MEMBASE0_CACHED | 
+                               BONITO_PCIMEMBASECFG |=
+                                       (BONITO_PCIMEMBASECFG_MEMBASE0_CACHED |
                                         BONITO_PCIMEMBASECFG_MEMBASE1_CACHED);
-                               printk("Disabled Bonito IOBC coherency\n");
+                               printk("Enabled Bonito IOBC coherency\n");
                        }
                }
                else
-                       panic ("Hardware DMA cache coherency not supported\n");
+                       panic("Hardware DMA cache coherency not supported");
 
 #endif
        }
 #ifdef CONFIG_DMA_COHERENT
        else {
-               panic ("Hardware DMA cache coherency not supported\n");
+               panic("Hardware DMA cache coherency not supported");
        }
 #endif
 
@@ -179,13 +179,9 @@ static int __init malta_setup(void)
        };
 #endif
 #endif
+
        mips_reboot_setup();
 
        board_time_init = mips_time_init;
-       board_timer_setup = mips_timer_setup;
-       rtc_get_time = mips_rtc_get_time;
-
-       return 0;
+       rtc_mips_get_time = mips_rtc_get_time;
 }
-
-early_initcall(malta_setup);