summaryrefslogtreecommitdiff
path: root/drivers/ide/ide-io-std.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-io-std.c')
-rw-r--r--drivers/ide/ide-io-std.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/ide/ide-io-std.c b/drivers/ide/ide-io-std.c
index 96a537da8925..f06940df255e 100644
--- a/drivers/ide/ide-io-std.c
+++ b/drivers/ide/ide-io-std.c
@@ -91,12 +91,9 @@ void ide_tf_load(ide_drive_t *drive, struct ide_cmd *cmd)
HIHI = 0xFF;
if (cmd->ftf_flags & IDE_FTFLAG_OUT_DATA) {
- u16 data = (tf->hob_data << 8) | tf->data;
+ u8 data[2] = { tf->data, tf->hob_data };
- if (mmio)
- writew(data, (void __iomem *)io_ports->data_addr);
- else
- outw(data, io_ports->data_addr);
+ ide_output_data(drive, cmd, data, 2);
}
if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE)
@@ -145,15 +142,12 @@ void ide_tf_read(ide_drive_t *drive, struct ide_cmd *cmd)
}
if (cmd->ftf_flags & IDE_FTFLAG_IN_DATA) {
- u16 data;
+ u8 data[2];
- if (mmio)
- data = readw((void __iomem *)io_ports->data_addr);
- else
- data = inw(io_ports->data_addr);
+ ide_input_data(drive, cmd, data, 2);
- tf->data = data & 0xff;
- tf->hob_data = (data >> 8) & 0xff;
+ tf->data = data[0];
+ tf->hob_data = data[1];
}
/* be sure we're looking at the low order bits */