X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=arch%2Fpowerpc%2Fkernel%2Fprom_init.c;h=f70bd090dacda51fb52b716fb7c8e92e8c27fc1a;hb=35a5d9ed9fedb74c22cb19ff7d749289473144e0;hp=2d80653aa2af54e866eee220d8193dde6d663c49;hpb=c9d20af62c59e49684f3882503351153964ff14b;p=pandora-kernel.git diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 2d80653aa2af..f70bd090dacd 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c @@ -822,6 +822,7 @@ static void __init prom_send_capabilities(void) /* try calling the ibm,client-architecture-support method */ if (call_prom_ret("call-method", 3, 2, &ret, ADDR("ibm,client-architecture-support"), + root, ADDR(ibm_architecture_vec)) == 0) { /* the call exists... */ if (ret) @@ -1622,6 +1623,15 @@ static int __init prom_find_machine_type(void) if (strstr(p, RELOC("Power Macintosh")) || strstr(p, RELOC("MacRISC"))) return PLATFORM_POWERMAC; +#ifdef CONFIG_PPC64 + /* We must make sure we don't detect the IBM Cell + * blades as pSeries due to some firmware issues, + * so we do it here. + */ + if (strstr(p, RELOC("IBM,CBEA")) || + strstr(p, RELOC("IBM,CPBW-1.0"))) + return PLATFORM_GENERIC; +#endif /* CONFIG_PPC64 */ i += sl + 1; } } @@ -2057,10 +2067,45 @@ static void __init flatten_device_tree(void) } - -static void __init fixup_device_tree(void) +#ifdef CONFIG_PPC_MAPLE +/* PIBS Version 1.05.0000 04/26/2005 has an incorrect /ht/isa/ranges property. + * The values are bad, and it doesn't even have the right number of cells. */ +static void __init fixup_device_tree_maple(void) { + phandle isa; + u32 isa_ranges[6]; + + isa = call_prom("finddevice", 1, 1, ADDR("/ht@0/isa@4")); + if (!PHANDLE_VALID(isa)) + return; + + if (prom_getprop(isa, "ranges", isa_ranges, sizeof(isa_ranges)) + == PROM_ERROR) + return; + + if (isa_ranges[0] != 0x1 || + isa_ranges[1] != 0xf4000000 || + isa_ranges[2] != 0x00010000) + return; + + prom_printf("fixing up bogus ISA range on Maple...\n"); + + isa_ranges[0] = 0x1; + isa_ranges[1] = 0x0; + isa_ranges[2] = 0x01002000; /* IO space; PCI device = 4 */ + isa_ranges[3] = 0x0; + isa_ranges[4] = 0x0; + isa_ranges[5] = 0x00010000; + prom_setprop(isa, "/ht@0/isa@4", "ranges", + isa_ranges, sizeof(isa_ranges)); +} +#else +#define fixup_device_tree_maple() +#endif + #if defined(CONFIG_PPC64) && defined(CONFIG_PPC_PMAC) +static void __init fixup_device_tree_pmac(void) +{ phandle u3, i2c, mpic; u32 u3_rev; u32 interrupts[2]; @@ -2097,9 +2142,16 @@ static void __init fixup_device_tree(void) parent = (u32)mpic; prom_setprop(i2c, "/u3@0,f8000000/i2c@f8001000", "interrupt-parent", &parent, sizeof(parent)); -#endif } +#else +#define fixup_device_tree_pmac() +#endif +static void __init fixup_device_tree(void) +{ + fixup_device_tree_maple(); + fixup_device_tree_pmac(); +} static void __init prom_find_boot_cpu(void) {