diff options
Diffstat (limited to 'arch/powerpc/kernel/prom_init.c')
-rw-r--r-- | arch/powerpc/kernel/prom_init.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index ebd501a59abd..462bced40c12 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -557,7 +557,9 @@ unsigned long prom_memparse(const char *ptr, const char **retptr) | |||
557 | static void __init early_cmdline_parse(void) | 557 | static void __init early_cmdline_parse(void) |
558 | { | 558 | { |
559 | struct prom_t *_prom = &RELOC(prom); | 559 | struct prom_t *_prom = &RELOC(prom); |
560 | #ifdef CONFIG_PPC64 | ||
560 | const char *opt; | 561 | const char *opt; |
562 | #endif | ||
561 | char *p; | 563 | char *p; |
562 | int l = 0; | 564 | int l = 0; |
563 | 565 | ||
@@ -2030,6 +2032,39 @@ static void __init fixup_device_tree_maple(void) | |||
2030 | #define fixup_device_tree_maple() | 2032 | #define fixup_device_tree_maple() |
2031 | #endif | 2033 | #endif |
2032 | 2034 | ||
2035 | #ifdef CONFIG_PPC_CHRP | ||
2036 | /* Pegasos lacks the "ranges" property in the isa node */ | ||
2037 | static void __init fixup_device_tree_chrp(void) | ||
2038 | { | ||
2039 | phandle isa; | ||
2040 | u32 isa_ranges[6]; | ||
2041 | char *name; | ||
2042 | int rc; | ||
2043 | |||
2044 | name = "/pci@80000000/isa@c"; | ||
2045 | isa = call_prom("finddevice", 1, 1, ADDR(name)); | ||
2046 | if (!PHANDLE_VALID(isa)) | ||
2047 | return; | ||
2048 | |||
2049 | rc = prom_getproplen(isa, "ranges"); | ||
2050 | if (rc != 0 && rc != PROM_ERROR) | ||
2051 | return; | ||
2052 | |||
2053 | prom_printf("Fixing up missing ISA range on Pegasos...\n"); | ||
2054 | |||
2055 | isa_ranges[0] = 0x1; | ||
2056 | isa_ranges[1] = 0x0; | ||
2057 | isa_ranges[2] = 0x01006000; | ||
2058 | isa_ranges[3] = 0x0; | ||
2059 | isa_ranges[4] = 0x0; | ||
2060 | isa_ranges[5] = 0x00010000; | ||
2061 | prom_setprop(isa, name, "ranges", | ||
2062 | isa_ranges, sizeof(isa_ranges)); | ||
2063 | } | ||
2064 | #else | ||
2065 | #define fixup_device_tree_chrp() | ||
2066 | #endif | ||
2067 | |||
2033 | #if defined(CONFIG_PPC64) && defined(CONFIG_PPC_PMAC) | 2068 | #if defined(CONFIG_PPC64) && defined(CONFIG_PPC_PMAC) |
2034 | static void __init fixup_device_tree_pmac(void) | 2069 | static void __init fixup_device_tree_pmac(void) |
2035 | { | 2070 | { |
@@ -2077,6 +2112,7 @@ static void __init fixup_device_tree_pmac(void) | |||
2077 | static void __init fixup_device_tree(void) | 2112 | static void __init fixup_device_tree(void) |
2078 | { | 2113 | { |
2079 | fixup_device_tree_maple(); | 2114 | fixup_device_tree_maple(); |
2115 | fixup_device_tree_chrp(); | ||
2080 | fixup_device_tree_pmac(); | 2116 | fixup_device_tree_pmac(); |
2081 | } | 2117 | } |
2082 | 2118 | ||