aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/kernel/prom_init.c55
-rw-r--r--drivers/ide/pci/via82cxxx.c11
2 files changed, 33 insertions, 33 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 */
2039static void __init fixup_device_tree_chrp(void) 2042static 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()
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c
index a508550c4095..8cc5423892ac 100644
--- a/drivers/ide/pci/via82cxxx.c
+++ b/drivers/ide/pci/via82cxxx.c
@@ -35,10 +35,6 @@
35#include <linux/ide.h> 35#include <linux/ide.h>
36#include <asm/io.h> 36#include <asm/io.h>
37 37
38#ifdef CONFIG_PPC_CHRP
39#include <asm/processor.h>
40#endif
41
42#include "ide-timing.h" 38#include "ide-timing.h"
43 39
44#define DISPLAY_VIA_TIMINGS 40#define DISPLAY_VIA_TIMINGS
@@ -436,13 +432,6 @@ static void __devinit init_hwif_via82cxxx(ide_hwif_t *hwif)
436 hwif->tuneproc = &via82cxxx_tune_drive; 432 hwif->tuneproc = &via82cxxx_tune_drive;
437 hwif->speedproc = &via_set_drive; 433 hwif->speedproc = &via_set_drive;
438 434
439
440#ifdef CONFIG_PPC_CHRP
441 if(machine_is(chrp) && _chrp_type == _CHRP_Pegasos) {
442 hwif->irq = hwif->channel ? 15 : 14;
443 }
444#endif
445
446 for (i = 0; i < 2; i++) { 435 for (i = 0; i < 2; i++) {
447 hwif->drives[i].io_32bit = 1; 436 hwif->drives[i].io_32bit = 1;
448 hwif->drives[i].unmask = (vdev->via_config->flags & VIA_NO_UNMASK) ? 0 : 1; 437 hwif->drives[i].unmask = (vdev->via_config->flags & VIA_NO_UNMASK) ? 0 : 1;