]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - arch/mips/mips-boards/malta/malta_setup.c
[MIPS] Replace board_timer_setup function pointer by plat_timer_setup.
[mirror_ubuntu-artful-kernel.git] / arch / mips / mips-boards / malta / malta_setup.c
index 3377e66de9eb350892f2c6bf9007c583b23672e3..ab460f805befcc57eb28a22ac63a14a80e8b7552 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>
 
 #ifdef CONFIG_MTD
 #include <linux/mtd/partitions.h>
@@ -45,7 +44,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
@@ -53,11 +51,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 },
 };
 
 #ifdef CONFIG_MTD
@@ -111,10 +109,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);
@@ -149,15 +149,15 @@ 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");
                        }
@@ -222,10 +222,5 @@ static int __init malta_setup(void)
        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);