diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-30 11:10:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-30 11:10:12 -0400 |
commit | 24a77daf3d80bddcece044e6dc3675e427eef3f3 (patch) | |
tree | 2c5e0b0bea394d6fe62c5d5857c252e83e48ac48 /arch/powerpc/kernel/prom_init.c | |
parent | e389f9aec689209724105ae80a6c91fd2e747bc9 (diff) | |
parent | f900e9777fc9b65140cb9570438597bc8fae56ab (diff) |
Merge branch 'for-2.6.22' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'for-2.6.22' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (255 commits)
[POWERPC] Remove dev_dbg redefinition in drivers/ps3/vuart.c
[POWERPC] remove kernel module option for booke wdt
[POWERPC] Avoid putting cpu node twice
[POWERPC] Spinlock initializer cleanup
[POWERPC] ppc4xx_sgdma needs dma-mapping.h
[POWERPC] arch/powerpc/sysdev/timer.c build fix
[POWERPC] get_property cleanups
[POWERPC] Remove the unused HTDMSOUND driver
[POWERPC] cell: cbe_cpufreq cleanup and crash fix
[POWERPC] Declare enable_kernel_spe in a header
[POWERPC] Add dt_xlate_addr() to bootwrapper
[POWERPC] bootwrapper: CONFIG_ -> CONFIG_DEVICE_TREE
[POWERPC] Don't define a custom bd_t for Xilixn Virtex based boards.
[POWERPC] Add sane defaults for Xilinx EDK generated xparameters files
[POWERPC] Add uartlite boot console driver for the zImage wrapper
[POWERPC] Stop using ppc_sys for Xilinx Virtex boards
[POWERPC] New registration for common Xilinx Virtex ppc405 platform devices
[POWERPC] Merge common virtex header files
[POWERPC] Rework Kconfig dependancies for Xilinx Virtex ppc405 platform
[POWERPC] Clean up cpufreq Kconfig dependencies
...
Diffstat (limited to 'arch/powerpc/kernel/prom_init.c')
-rw-r--r-- | arch/powerpc/kernel/prom_init.c | 55 |
1 files changed, 33 insertions, 22 deletions
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 4fb5938ce6d3..e27d9d1b6e67 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -2035,39 +2035,50 @@ static void __init fixup_device_tree_maple(void) | |||
2035 | #endif | 2035 | #endif |
2036 | 2036 | ||
2037 | #ifdef CONFIG_PPC_CHRP | 2037 | #ifdef CONFIG_PPC_CHRP |
2038 | /* Pegasos and BriQ lacks the "ranges" property in the isa node */ | 2038 | /* |
2039 | * Pegasos and BriQ lacks the "ranges" property in the isa node | ||
2040 | * Pegasos needs decimal IRQ 14/15, not hexadecimal | ||
2041 | */ | ||
2039 | static void __init fixup_device_tree_chrp(void) | 2042 | static void __init fixup_device_tree_chrp(void) |
2040 | { | 2043 | { |
2041 | phandle isa; | 2044 | phandle ph; |
2042 | u32 isa_ranges[6]; | 2045 | u32 prop[6]; |
2043 | u32 rloc = 0x01006000; /* IO space; PCI device = 12 */ | 2046 | u32 rloc = 0x01006000; /* IO space; PCI device = 12 */ |
2044 | char *name; | 2047 | char *name; |
2045 | int rc; | 2048 | int rc; |
2046 | 2049 | ||
2047 | name = "/pci@80000000/isa@c"; | 2050 | name = "/pci@80000000/isa@c"; |
2048 | isa = call_prom("finddevice", 1, 1, ADDR(name)); | 2051 | ph = call_prom("finddevice", 1, 1, ADDR(name)); |
2049 | if (!PHANDLE_VALID(isa)) { | 2052 | if (!PHANDLE_VALID(ph)) { |
2050 | name = "/pci@ff500000/isa@6"; | 2053 | name = "/pci@ff500000/isa@6"; |
2051 | isa = call_prom("finddevice", 1, 1, ADDR(name)); | 2054 | ph = call_prom("finddevice", 1, 1, ADDR(name)); |
2052 | rloc = 0x01003000; /* IO space; PCI device = 6 */ | 2055 | rloc = 0x01003000; /* IO space; PCI device = 6 */ |
2053 | } | 2056 | } |
2054 | if (!PHANDLE_VALID(isa)) | 2057 | if (PHANDLE_VALID(ph)) { |
2055 | return; | 2058 | rc = prom_getproplen(ph, "ranges"); |
2056 | 2059 | if (rc == 0 || rc == PROM_ERROR) { | |
2057 | rc = prom_getproplen(isa, "ranges"); | 2060 | prom_printf("Fixing up missing ISA range on Pegasos...\n"); |
2058 | if (rc != 0 && rc != PROM_ERROR) | 2061 | |
2059 | return; | 2062 | prop[0] = 0x1; |
2060 | 2063 | prop[1] = 0x0; | |
2061 | prom_printf("Fixing up missing ISA range on Pegasos...\n"); | 2064 | prop[2] = rloc; |
2065 | prop[3] = 0x0; | ||
2066 | prop[4] = 0x0; | ||
2067 | prop[5] = 0x00010000; | ||
2068 | prom_setprop(ph, name, "ranges", prop, sizeof(prop)); | ||
2069 | } | ||
2070 | } | ||
2062 | 2071 | ||
2063 | isa_ranges[0] = 0x1; | 2072 | name = "/pci@80000000/ide@C,1"; |
2064 | isa_ranges[1] = 0x0; | 2073 | ph = call_prom("finddevice", 1, 1, ADDR(name)); |
2065 | isa_ranges[2] = rloc; | 2074 | if (PHANDLE_VALID(ph)) { |
2066 | isa_ranges[3] = 0x0; | 2075 | prom_printf("Fixing up IDE interrupt on Pegasos...\n"); |
2067 | isa_ranges[4] = 0x0; | 2076 | prop[0] = 14; |
2068 | isa_ranges[5] = 0x00010000; | 2077 | prop[1] = 0x0; |
2069 | prom_setprop(isa, name, "ranges", | 2078 | prop[2] = 15; |
2070 | isa_ranges, sizeof(isa_ranges)); | 2079 | prop[3] = 0x0; |
2080 | prom_setprop(ph, name, "interrupts", prop, 4*sizeof(u32)); | ||
2081 | } | ||
2071 | } | 2082 | } |
2072 | #else | 2083 | #else |
2073 | #define fixup_device_tree_chrp() | 2084 | #define fixup_device_tree_chrp() |