be2net: implement EEH pci error recovery handlers
[safe/jmp/linux-2.6] / drivers / ide / at91_ide.c
index 8d39cc9..248219a 100644 (file)
@@ -29,9 +29,7 @@
 
 #include <mach/board.h>
 #include <mach/gpio.h>
-#include <mach/at91sam9263.h>
 #include <mach/at91sam9_smc.h>
-#include <mach/at91sam9263_matrix.h>
 
 #define DRV_NAME "at91_ide"
 
@@ -185,8 +183,7 @@ static void at91_ide_set_pio_mode(ide_drive_t *drive, const u8 pio)
        timing = ide_timing_find_mode(XFER_PIO_0 + pio);
        BUG_ON(!timing);
 
-       if ((pio > 2 || ata_id_has_iordy(drive->id)) &&
-           !(ata_id_is_cfa(drive->id) && pio > 4))
+       if (ide_pio_need_iordy(drive, pio))
                use_iordy = 1;
 
        apply_timings(chipselect, pio, timing, use_iordy);
@@ -247,8 +244,7 @@ irqreturn_t at91_irq_handler(int irq, void *dev_id)
 static int __init at91_ide_probe(struct platform_device *pdev)
 {
        int ret;
-       hw_regs_t hw;
-       hw_regs_t *hws[] = { &hw, NULL, NULL, NULL };
+       struct ide_hw hw, *hws[] = { &hw };
        struct ide_host *host;
        struct resource *res;
        unsigned long tf_base = 0, ctl_base = 0;
@@ -307,7 +303,7 @@ static int __init at91_ide_probe(struct platform_device *pdev)
        hw.irq = board->irq_pin;
        hw.dev = &pdev->dev;
 
-       host = ide_host_alloc(&at91_ide_port_info, hws);
+       host = ide_host_alloc(&at91_ide_port_info, hws, 1);
        if (!host) {
                perr("failed to allocate ide host\n");
                return -ENOMEM;