aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/scc_pata.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/scc_pata.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/scc_pata.c')
-rw-r--r--drivers/ide/scc_pata.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/ide/scc_pata.c b/drivers/ide/scc_pata.c
index 6e47eac1cd7f..6ba4983d831c 100644
--- a/drivers/ide/scc_pata.c
+++ b/drivers/ide/scc_pata.c
@@ -148,17 +148,8 @@ static u8 scc_dma_sff_read_status(ide_hwif_t *hwif)
148 return (u8)in_be32((void *)(hwif->dma_base + 4)); 148 return (u8)in_be32((void *)(hwif->dma_base + 4));
149} 149}
150 150
151static void scc_set_irq(ide_hwif_t *hwif, int on) 151static void scc_write_devctl(ide_hwif_t *hwif, u8 ctl)
152{ 152{
153 u8 ctl = ATA_DEVCTL_OBS;
154
155 if (on == 4) { /* hack for SRST */
156 ctl |= 4;
157 on &= ~4;
158 }
159
160 ctl |= on ? 0 : 2;
161
162 out_be32((void *)hwif->io_ports.ctl_addr, ctl); 153 out_be32((void *)hwif->io_ports.ctl_addr, ctl);
163 eieio(); 154 eieio();
164 in_be32((void *)(hwif->dma_base + 0x01c)); 155 in_be32((void *)(hwif->dma_base + 0x01c));
@@ -843,8 +834,7 @@ static const struct ide_tp_ops scc_tp_ops = {
843 .exec_command = scc_exec_command, 834 .exec_command = scc_exec_command,
844 .read_status = scc_read_status, 835 .read_status = scc_read_status,
845 .read_altstatus = scc_read_altstatus, 836 .read_altstatus = scc_read_altstatus,
846 837 .write_devctl = scc_write_devctl,
847 .set_irq = scc_set_irq,
848 838
849 .tf_load = scc_tf_load, 839 .tf_load = scc_tf_load,
850 .tf_read = scc_tf_read, 840 .tf_read = scc_tf_read,