aboutsummaryrefslogtreecommitdiffstats
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.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/drivers/ide/ide-io-std.c b/drivers/ide/ide-io-std.c
index 3a867e49a0af..bbeedce6b17d 100644
--- a/drivers/ide/ide-io-std.c
+++ b/drivers/ide/ide-io-std.c
@@ -64,23 +64,14 @@ u8 ide_read_altstatus(ide_hwif_t *hwif)
64} 64}
65EXPORT_SYMBOL_GPL(ide_read_altstatus); 65EXPORT_SYMBOL_GPL(ide_read_altstatus);
66 66
67void ide_set_irq(ide_hwif_t *hwif, int on) 67void ide_write_devctl(ide_hwif_t *hwif, u8 ctl)
68{ 68{
69 u8 ctl = ATA_DEVCTL_OBS;
70
71 if (on == 4) { /* hack for SRST */
72 ctl |= 4;
73 on &= ~4;
74 }
75
76 ctl |= on ? 0 : 2;
77
78 if (hwif->host_flags & IDE_HFLAG_MMIO) 69 if (hwif->host_flags & IDE_HFLAG_MMIO)
79 writeb(ctl, (void __iomem *)hwif->io_ports.ctl_addr); 70 writeb(ctl, (void __iomem *)hwif->io_ports.ctl_addr);
80 else 71 else
81 outb(ctl, hwif->io_ports.ctl_addr); 72 outb(ctl, hwif->io_ports.ctl_addr);
82} 73}
83EXPORT_SYMBOL_GPL(ide_set_irq); 74EXPORT_SYMBOL_GPL(ide_write_devctl);
84 75
85void ide_tf_load(ide_drive_t *drive, struct ide_cmd *cmd) 76void ide_tf_load(ide_drive_t *drive, struct ide_cmd *cmd)
86{ 77{
@@ -312,8 +303,7 @@ const struct ide_tp_ops default_tp_ops = {
312 .exec_command = ide_exec_command, 303 .exec_command = ide_exec_command,
313 .read_status = ide_read_status, 304 .read_status = ide_read_status,
314 .read_altstatus = ide_read_altstatus, 305 .read_altstatus = ide_read_altstatus,
315 306 .write_devctl = ide_write_devctl,
316 .set_irq = ide_set_irq,
317 307
318 .tf_load = ide_tf_load, 308 .tf_load = ide_tf_load,
319 .tf_read = ide_tf_read, 309 .tf_read = ide_tf_read,