X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fppc%2Fsyslib%2Fprom_init.c;h=83686bc4d79f9fe0bd3c8e5d5826f2d9cae61885;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=c9701d5ba3b0f18f9db94c3f3bfe50190c6284c3;hpb=9bf4aaab3e101692164d49b7ca357651eb691cb6;p=linux-2.6.git diff --git a/arch/ppc/syslib/prom_init.c b/arch/ppc/syslib/prom_init.c index c9701d5ba..83686bc4d 100644 --- a/arch/ppc/syslib/prom_init.c +++ b/arch/ppc/syslib/prom_init.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -26,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -115,11 +115,11 @@ prom_entry prom __initdata; ihandle prom_chosen __initdata; ihandle prom_stdout __initdata; -char *prom_display_paths[FB_MAX] __initdata; -phandle prom_display_nodes[FB_MAX] __initdata; -unsigned int prom_num_displays __initdata; -char *of_stdout_device __initdata; +static char *prom_display_paths[FB_MAX] __initdata; +static phandle prom_display_nodes[FB_MAX] __initdata; +static unsigned int prom_num_displays __initdata; static ihandle prom_disp_node __initdata; +char *of_stdout_device __initdata; unsigned int rtas_data; /* physical pointer */ unsigned int rtas_entry; /* physical pointer */ @@ -403,6 +403,7 @@ check_display(unsigned long mem) for (j=0; j 0 && !strncmp (model, "Pegasos", 7) + && strncmp (model, "Pegasos2", 8)) { + /* Pegasos 1 has a broken translate method in the OF, + * and furthermore the BATs are mapped 1:1 so the phys + * address calculated above is correct, so let's use + * it directly. + */ + } else if (offset == 0) { + /* If we are already running at 0xc0000000, we assume we were + * loaded by an OF bootloader which did set a BAT for us. + * This breaks OF translate so we force phys to be 0. + */ prom_print("(already at 0xc0000000) phys=0\n"); phys = 0; } else if ((int) call_prom("getprop", 4, 1, prom_chosen, "mmu",