aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-io-std.c
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2009-04-08 14:13:02 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-04-08 14:13:02 +0200
commit30881b9ac91e7c23e0ceb8414ab7de1961809bdd (patch)
tree16ef2aa160d888fb109b4fd146925a1b1178c1aa /drivers/ide/ide-io-std.c
parentide: move common code out of tf_load() method (diff)
downloadlinux-dev-30881b9ac91e7c23e0ceb8414ab7de1961809bdd.tar.xz
linux-dev-30881b9ac91e7c23e0ceb8414ab7de1961809bdd.zip
ide: call write_devctl() method from tf_read() method
Use write_devctl() method to clear/set the HOB bit in tf_read() method. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-io-std.c')
-rw-r--r--drivers/ide/ide-io-std.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/ide/ide-io-std.c b/drivers/ide/ide-io-std.c
index 7950b3bb4312..66c27768e85b 100644
--- a/drivers/ide/ide-io-std.c
+++ b/drivers/ide/ide-io-std.c
@@ -133,21 +133,17 @@ void ide_tf_read(ide_drive_t *drive, struct ide_cmd *cmd)
ide_hwif_t *hwif = drive->hwif;
struct ide_io_ports *io_ports = &hwif->io_ports;
struct ide_taskfile *tf = &cmd->tf;
- void (*tf_outb)(u8 addr, unsigned long port);
u8 (*tf_inb)(unsigned long port);
u8 valid = cmd->valid.in.tf;
u8 mmio = (hwif->host_flags & IDE_HFLAG_MMIO) ? 1 : 0;
- if (mmio) {
- tf_outb = ide_mm_outb;
+ if (mmio)
tf_inb = ide_mm_inb;
- } else {
- tf_outb = ide_outb;
+ else
tf_inb = ide_inb;
- }
/* be sure we're looking at the low order bits */
- tf_outb(ATA_DEVCTL_OBS, io_ports->ctl_addr);
+ hwif->tp_ops->write_devctl(hwif, ATA_DEVCTL_OBS);
if (valid & IDE_VALID_ERROR)
tf->error = tf_inb(io_ports->feature_addr);
@@ -163,7 +159,7 @@ void ide_tf_read(ide_drive_t *drive, struct ide_cmd *cmd)
tf->device = tf_inb(io_ports->device_addr);
if (cmd->tf_flags & IDE_TFLAG_LBA48) {
- tf_outb(ATA_HOB | ATA_DEVCTL_OBS, io_ports->ctl_addr);
+ hwif->tp_ops->write_devctl(hwif, ATA_HOB | ATA_DEVCTL_OBS);
tf = &cmd->hob;
valid = cmd->valid.in.hob;