summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/prom_init.c
diff options
context:
space:
mode:
authorOlaf Hering <olaf@aepfle.de>2007-08-18 04:27:17 +1000
committerPaul Mackerras <paulus@samba.org>2007-08-22 15:21:46 +1000
commit556ecf9be66f4d493e19bc71a7ce84366d512b71 (patch)
tree1d03d69ba1324ab5155cd9baf0f857699751846e /arch/powerpc/kernel/prom_init.c
parent2ba4573cdaf98b0f3acb8795a66f412c1c41284a (diff)
[POWERPC] Advertise correct IDE mode on Pegasos2
The built-in IDE controller is configured in legacy mode, but the PCI registers advertise native mode. Force the PCI class into legacy mode. This allows pata_via to access two drives. The Pegasos specific irq enforcement in the via82cxxx driver must stay because there is apparently no generic way to setup irq per channel. Tested on Pegasos2 with firmware version 20040810, and two IDE disks. Signed-off-by: Olaf Hering <olaf@aepfle.de> 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.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index a1d582e3862..29c2160bcbb 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -2046,6 +2046,7 @@ static void __init fixup_device_tree_maple(void)
/*
* Pegasos and BriQ lacks the "ranges" property in the isa node
* Pegasos needs decimal IRQ 14/15, not hexadecimal
+ * Pegasos has the IDE configured in legacy mode, but advertised as native
*/
static void __init fixup_device_tree_chrp(void)
{
@@ -2083,9 +2084,13 @@ static void __init fixup_device_tree_chrp(void)
prom_printf("Fixing up IDE interrupt on Pegasos...\n");
prop[0] = 14;
prop[1] = 0x0;
- prop[2] = 15;
- prop[3] = 0x0;
- prom_setprop(ph, name, "interrupts", prop, 4*sizeof(u32));
+ prom_setprop(ph, name, "interrupts", prop, 2*sizeof(u32));
+ prom_printf("Fixing up IDE class-code on Pegasos...\n");
+ rc = prom_getprop(ph, "class-code", prop, sizeof(u32));
+ if (rc == sizeof(u32)) {
+ prop[0] &= ~0x5;
+ prom_setprop(ph, name, "class-code", prop, sizeof(u32));
+ }
}
}
#else