X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fmips%2Fmomentum%2Focelot_g%2Fprom.c;h=2b480b2ef03b2b4b990feb0a44c37a8ddce405a1;hb=27879d9d66f2dea19cfcd0e1df8358a33447f45b;hp=6b4f577c275734790e92a65c3ecab89f97e1a93a;hpb=a91482bdcc2e0f6035702e46f1b99043a0893346;p=linux-2.6.git diff --git a/arch/mips/momentum/ocelot_g/prom.c b/arch/mips/momentum/ocelot_g/prom.c index 6b4f577c2..2b480b2ef 100644 --- a/arch/mips/momentum/ocelot_g/prom.c +++ b/arch/mips/momentum/ocelot_g/prom.c @@ -20,13 +20,13 @@ #include #include #include -#include +#include "gt64240.h" #include "ocelot_pld.h" struct callvectors* debug_vectors; -extern unsigned long marvell_base; +extern unsigned long gt64240_base; extern unsigned long bus_clock; #ifdef CONFIG_GALILLEO_GT64240_ETH @@ -38,8 +38,10 @@ 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; @@ -69,15 +71,17 @@ void __init prom_init(void) while (*env) { if (strncmp("gtbase", *env, strlen("gtbase")) == 0) { - marvell_base = simple_strtol(*env + strlen("gtbase="), + gt64240_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)