]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ide/ide-iops.c
omap_hsmmc: Flush posted write to IRQ
[linux-2.6-omap-h63xx.git] / drivers / ide / ide-iops.c
index ae227dd8466f683a093c99a646c0ebd1525c9bff..27bb70ddd45929572086b1028d3d6bdb3b56d518 100644 (file)
 #include <asm/uaccess.h>
 #include <asm/io.h>
 
-void SELECT_DRIVE(ide_drive_t *drive)
-{
-       ide_hwif_t *hwif = drive->hwif;
-       const struct ide_port_ops *port_ops = hwif->port_ops;
-       struct ide_cmd cmd;
-
-       if (port_ops && port_ops->selectproc)
-               port_ops->selectproc(drive);
-
-       memset(&cmd, 0, sizeof(cmd));
-       cmd.tf_flags = IDE_TFLAG_OUT_DEVICE;
-
-       drive->hwif->tp_ops->tf_load(drive, &cmd);
-}
-
 void SELECT_MASK(ide_drive_t *drive, int mask)
 {
        const struct ide_port_ops *port_ops = drive->hwif->port_ops;
@@ -55,7 +40,7 @@ u8 ide_read_error(ide_drive_t *drive)
        struct ide_cmd cmd;
 
        memset(&cmd, 0, sizeof(cmd));
-       cmd.tf_flags = IDE_TFLAG_IN_FEATURE;
+       cmd.tf_flags = IDE_TFLAG_IN_ERROR;
 
        drive->hwif->tp_ops->tf_read(drive, &cmd);
 
@@ -357,7 +342,7 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed)
        disable_irq_nosync(hwif->irq);
 
        udelay(1);
-       SELECT_DRIVE(drive);
+       tp_ops->dev_select(drive);
        SELECT_MASK(drive, 1);
        udelay(1);
        tp_ops->write_devctl(hwif, ATA_NIEN | ATA_DEVCTL_OBS);