]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/ia64/kernel/machvec.c
h63xx: nfs mount works, gpe image boots to ts config screen.
[linux-2.6-omap-h63xx.git] / arch / ia64 / kernel / machvec.c
index 4b0b71d5aef4520700c259258eddd801378e0fb9..7ccb228ceedc337e90ae956ad3d1934e66c25bda 100644 (file)
@@ -1,4 +1,3 @@
-#include <linux/config.h>
 #include <linux/module.h>
 
 #include <asm/machvec.h>
 struct ia64_machine_vector ia64_mv;
 EXPORT_SYMBOL(ia64_mv);
 
-static __initdata const char *mvec_name;
-static __init int setup_mvec(char *s)
-{
-       mvec_name = s;
-       return 0;
-}
-early_param("machvec", setup_mvec);
-
 static struct ia64_machine_vector * __init
 lookup_machvec (const char *name)
 {
@@ -36,13 +27,13 @@ lookup_machvec (const char *name)
        return 0;
 }
 
-void
+void __init
 machvec_init (const char *name)
 {
        struct ia64_machine_vector *mv;
 
        if (!name)
-               name = mvec_name ? mvec_name : acpi_get_sysname();
+               name = acpi_get_sysname();
        mv = lookup_machvec(name);
        if (!mv)
                panic("generic kernel failed to find machine vector for"
@@ -52,6 +43,23 @@ machvec_init (const char *name)
        printk(KERN_INFO "booting generic kernel on platform %s\n", name);
 }
 
+void __init
+machvec_init_from_cmdline(const char *cmdline)
+{
+       char str[64];
+       const char *start;
+       char *end;
+
+       if (! (start = strstr(cmdline, "machvec=")) )
+               return machvec_init(NULL);
+
+       strlcpy(str, start + strlen("machvec="), sizeof(str));
+       if ( (end = strchr(str, ' ')) )
+               *end = '\0';
+
+       return machvec_init(str);
+}
+
 #endif /* CONFIG_IA64_GENERIC */
 
 void
@@ -61,7 +69,7 @@ machvec_setup (char **arg)
 EXPORT_SYMBOL(machvec_setup);
 
 void
-machvec_timer_interrupt (int irq, void *dev_id, struct pt_regs *regs)
+machvec_timer_interrupt (int irq, void *dev_id)
 {
 }
 EXPORT_SYMBOL(machvec_timer_interrupt);