vserver 1.9.5.x5
[linux-2.6.git] / drivers / ide / pci / via82cxxx.c
index c83d5e5..d90f4d2 100644 (file)
 #include <linux/ide.h>
 #include <asm/io.h>
 
+#ifdef CONFIG_PPC_MULTIPLATFORM
+#include <asm/processor.h>
+#endif
+
 #include "ide-timing.h"
 
 #define DISPLAY_VIA_TIMINGS
@@ -584,6 +588,13 @@ static void __init init_hwif_via82cxxx(ide_hwif_t *hwif)
        hwif->tuneproc = &via82cxxx_tune_drive;
        hwif->speedproc = &via_set_drive;
 
+
+#if defined(CONFIG_PPC_MULTIPLATFORM) && defined(CONFIG_PPC32)
+       if(_machine == _MACH_chrp && _chrp_type == _CHRP_Pegasos) {
+               hwif->irq = hwif->channel ? 15 : 14;
+       }
+#endif
+
        for (i = 0; i < 2; i++) {
                hwif->drives[i].io_32bit = 1;
                hwif->drives[i].unmask = (via_config->flags & VIA_NO_UNMASK) ? 0 : 1;
@@ -620,8 +631,7 @@ static ide_pci_device_t via82cxxx_chipset __devinitdata = {
 
 static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
-       ide_setup_pci_device(dev, &via82cxxx_chipset);
-       return 0;
+       return ide_setup_pci_device(dev, &via82cxxx_chipset);
 }
 
 static struct pci_device_id via_pci_tbl[] = {