diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2006-07-03 03:22:05 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-07-03 03:22:05 -0400 |
commit | 980a65136569b841cebaad524a34482b0b1627a9 (patch) | |
tree | 7207f26dfc1085b30a8bee9651da431490d59dd3 /arch/powerpc/kernel/prom_init.c | |
parent | ab13446616118dc61c00ea50cc49919400717dd0 (diff) |
[POWERPC] Fix booting on Momentum "Apache" board (a Maple derivative)
This extends the maple device-tree workarounds to work on the
Apache board as well, and extends the maple platform probing code
to recognize the Apache board.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/prom_init.c')
-rw-r--r-- | arch/powerpc/kernel/prom_init.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 1e95a9f8cda1..ebd501a59abd 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -1990,12 +1990,22 @@ static void __init flatten_device_tree(void) | |||
1990 | static void __init fixup_device_tree_maple(void) | 1990 | static void __init fixup_device_tree_maple(void) |
1991 | { | 1991 | { |
1992 | phandle isa; | 1992 | phandle isa; |
1993 | u32 rloc = 0x01002000; /* IO space; PCI device = 4 */ | ||
1993 | u32 isa_ranges[6]; | 1994 | u32 isa_ranges[6]; |
1994 | 1995 | char *name; | |
1995 | isa = call_prom("finddevice", 1, 1, ADDR("/ht@0/isa@4")); | 1996 | |
1997 | name = "/ht@0/isa@4"; | ||
1998 | isa = call_prom("finddevice", 1, 1, ADDR(name)); | ||
1999 | if (!PHANDLE_VALID(isa)) { | ||
2000 | name = "/ht@0/isa@6"; | ||
2001 | isa = call_prom("finddevice", 1, 1, ADDR(name)); | ||
2002 | rloc = 0x01003000; /* IO space; PCI device = 6 */ | ||
2003 | } | ||
1996 | if (!PHANDLE_VALID(isa)) | 2004 | if (!PHANDLE_VALID(isa)) |
1997 | return; | 2005 | return; |
1998 | 2006 | ||
2007 | if (prom_getproplen(isa, "ranges") != 12) | ||
2008 | return; | ||
1999 | if (prom_getprop(isa, "ranges", isa_ranges, sizeof(isa_ranges)) | 2009 | if (prom_getprop(isa, "ranges", isa_ranges, sizeof(isa_ranges)) |
2000 | == PROM_ERROR) | 2010 | == PROM_ERROR) |
2001 | return; | 2011 | return; |
@@ -2005,15 +2015,15 @@ static void __init fixup_device_tree_maple(void) | |||
2005 | isa_ranges[2] != 0x00010000) | 2015 | isa_ranges[2] != 0x00010000) |
2006 | return; | 2016 | return; |
2007 | 2017 | ||
2008 | prom_printf("fixing up bogus ISA range on Maple...\n"); | 2018 | prom_printf("Fixing up bogus ISA range on Maple/Apache...\n"); |
2009 | 2019 | ||
2010 | isa_ranges[0] = 0x1; | 2020 | isa_ranges[0] = 0x1; |
2011 | isa_ranges[1] = 0x0; | 2021 | isa_ranges[1] = 0x0; |
2012 | isa_ranges[2] = 0x01002000; /* IO space; PCI device = 4 */ | 2022 | isa_ranges[2] = rloc; |
2013 | isa_ranges[3] = 0x0; | 2023 | isa_ranges[3] = 0x0; |
2014 | isa_ranges[4] = 0x0; | 2024 | isa_ranges[4] = 0x0; |
2015 | isa_ranges[5] = 0x00010000; | 2025 | isa_ranges[5] = 0x00010000; |
2016 | prom_setprop(isa, "/ht@0/isa@4", "ranges", | 2026 | prom_setprop(isa, name, "ranges", |
2017 | isa_ranges, sizeof(isa_ranges)); | 2027 | isa_ranges, sizeof(isa_ranges)); |
2018 | } | 2028 | } |
2019 | #else | 2029 | #else |