fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / arch / mips / momentum / ocelot_g / prom.c
index 8901280..2f75c6b 100644 (file)
@@ -11,7 +11,6 @@
  * Free Software Foundation;  either version 2 of the  License, or (at your
  * option) any later version.
  */
-#include <linux/config.h>
 #include <linux/init.h>
 #include <linux/mm.h>
 #include <linux/sched.h>
 
 #include <asm/addrspace.h>
 #include <asm/bootinfo.h>
+#include <asm/pmon.h>
+#include <asm/gt64240.h>
 
-#include "gt64240.h"
 #include "ocelot_pld.h"
 
-struct callvectors {
-       int     (*open) (char*, int, int);
-       int     (*close) (int);
-       int     (*read) (int, void*, int);
-       int     (*write) (int, void*, int);
-       off_t   (*lseek) (int, off_t, int);
-       int     (*printf) (const char*, ...);
-       void    (*cacheflush) (void);
-       char*   (*gets) (char*);
-};
-
 struct callvectors* debug_vectors;
 
-extern unsigned long gt64240_base;
+extern unsigned long marvell_base;
 extern unsigned long bus_clock;
 
-#ifdef CONFIG_GALILLEO_GT64240_ETH
+#ifdef CONFIG_GALILEO_GT64240_ETH
 extern unsigned char prom_mac_addr_base[6];
 #endif
 
@@ -48,10 +37,8 @@ const char *get_system_type(void)
        return "Momentum Ocelot";
 }
 
-/* [jsun@junsun.net] PMON passes arguments in C main() style */
 void __init prom_init(void)
 {
-       uint32_t tmp;
        int argc = fw_arg0;
        char **arg = (char **) fw_arg1;
        char **env = (char **) fw_arg2;
@@ -74,24 +61,22 @@ void __init prom_init(void)
        mips_machgroup = MACH_GROUP_MOMENCO;
        mips_machtype = MACH_MOMENCO_OCELOT_G;
 
-#ifdef CONFIG_GALILLEO_GT64240_ETH
+#ifdef CONFIG_GALILEO_GT64240_ETH
        /* get the base MAC address for on-board ethernet ports */
        memcpy(prom_mac_addr_base, (void*)0xfc807cf2, 6);
 #endif
 
        while (*env) {
                if (strncmp("gtbase", *env, strlen("gtbase")) == 0) {
-                       gt64240_base = simple_strtol(*env + strlen("gtbase="),
+                       marvell_base = simple_strtol(*env + strlen("gtbase="),
                                                        NULL, 16);
                }
                if (strncmp("busclock", *env, strlen("busclock")) == 0) {
                        bus_clock = simple_strtol(*env + strlen("busclock="),
                                                        NULL, 10);
                }
-               *env++;
+               env++;
        }
-
-       debug_vectors->printf("Booting Linux kernel...\n");
 }
 
 unsigned long __init prom_free_prom_memory(void)