aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-io-std.c
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2009-03-31 14:15:30 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-31 14:15:30 -0400
commitecf3a31d2a08a419bdf919456f1724f5b72bde2c (patch)
tree11a5b4685425541fa4bb267ac6f897cb1c38ba41 /drivers/ide/ide-io-std.c
parent4d74c3fcf2b90487eacec511bc8c07177711c81c (diff)
ide: turn set_irq() method into write_devctl() method
Turn set_irq() method with its software reset hack into write_devctl() method (for just writing a value into the device control register) at last... 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.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,