aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/prom_init.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2006-06-01 05:05:23 -0400
committerPaul Mackerras <paulus@samba.org>2006-06-01 05:05:23 -0400
commitc029cc66cb3d83f70c02e0c182f0eed1419f8020 (patch)
treeb9ed887a0e6434fedebcbf90b3d2ba1aeff68a01 /arch/powerpc/kernel/prom_init.c
parent0a9cb46a73abd6c45e7c986bec984eed60c417b6 (diff)
parentba8f5baba79da8eb502f8534c3a8ecb64aceb790 (diff)
Merge branch 'merge'
Diffstat (limited to 'arch/powerpc/kernel/prom_init.c')
-rw-r--r--arch/powerpc/kernel/prom_init.c48
1 files changed, 45 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 12fbdbb2d54a..5908690d0868 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -1975,10 +1975,45 @@ static void __init flatten_device_tree(void)
1975 1975
1976} 1976}
1977 1977
1978 1978#ifdef CONFIG_PPC_MAPLE
1979static void __init fixup_device_tree(void) 1979/* PIBS Version 1.05.0000 04/26/2005 has an incorrect /ht/isa/ranges property.
1980 * The values are bad, and it doesn't even have the right number of cells. */
1981static void __init fixup_device_tree_maple(void)
1980{ 1982{
1983 phandle isa;
1984 u32 isa_ranges[6];
1985
1986 isa = call_prom("finddevice", 1, 1, ADDR("/ht@0/isa@4"));
1987 if (!PHANDLE_VALID(isa))
1988 return;
1989
1990 if (prom_getprop(isa, "ranges", isa_ranges, sizeof(isa_ranges))
1991 == PROM_ERROR)
1992 return;
1993
1994 if (isa_ranges[0] != 0x1 ||
1995 isa_ranges[1] != 0xf4000000 ||
1996 isa_ranges[2] != 0x00010000)
1997 return;
1998
1999 prom_printf("fixing up bogus ISA range on Maple...\n");
2000
2001 isa_ranges[0] = 0x1;
2002 isa_ranges[1] = 0x0;
2003 isa_ranges[2] = 0x01002000; /* IO space; PCI device = 4 */
2004 isa_ranges[3] = 0x0;
2005 isa_ranges[4] = 0x0;
2006 isa_ranges[5] = 0x00010000;
2007 prom_setprop(isa, "/ht@0/isa@4", "ranges",
2008 isa_ranges, sizeof(isa_ranges));
2009}
2010#else
2011#define fixup_device_tree_maple()
2012#endif
2013
1981#if defined(CONFIG_PPC64) && defined(CONFIG_PPC_PMAC) 2014#if defined(CONFIG_PPC64) && defined(CONFIG_PPC_PMAC)
2015static void __init fixup_device_tree_pmac(void)
2016{
1982 phandle u3, i2c, mpic; 2017 phandle u3, i2c, mpic;
1983 u32 u3_rev; 2018 u32 u3_rev;
1984 u32 interrupts[2]; 2019 u32 interrupts[2];
@@ -2015,9 +2050,16 @@ static void __init fixup_device_tree(void)
2015 parent = (u32)mpic; 2050 parent = (u32)mpic;
2016 prom_setprop(i2c, "/u3@0,f8000000/i2c@f8001000", "interrupt-parent", 2051 prom_setprop(i2c, "/u3@0,f8000000/i2c@f8001000", "interrupt-parent",
2017 &parent, sizeof(parent)); 2052 &parent, sizeof(parent));
2018#endif
2019} 2053}
2054#else
2055#define fixup_device_tree_pmac()
2056#endif
2020 2057
2058static void __init fixup_device_tree(void)
2059{
2060 fixup_device_tree_maple();
2061 fixup_device_tree_pmac();
2062}
2021 2063
2022static void __init prom_find_boot_cpu(void) 2064static void __init prom_find_boot_cpu(void)
2023{ 2065{