diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2009-03-31 14:15:30 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-31 14:15:30 -0400 |
commit | ecf3a31d2a08a419bdf919456f1724f5b72bde2c (patch) | |
tree | 11a5b4685425541fa4bb267ac6f897cb1c38ba41 /drivers/ide/pmac.c | |
parent | 4d74c3fcf2b90487eacec511bc8c07177711c81c (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/pmac.c')
-rw-r--r-- | drivers/ide/pmac.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/ide/pmac.c b/drivers/ide/pmac.c index 879c3d8d9f36..7aa45ea37eeb 100644 --- a/drivers/ide/pmac.c +++ b/drivers/ide/pmac.c | |||
@@ -476,17 +476,8 @@ static void pmac_exec_command(ide_hwif_t *hwif, u8 cmd) | |||
476 | + IDE_TIMING_CONFIG)); | 476 | + IDE_TIMING_CONFIG)); |
477 | } | 477 | } |
478 | 478 | ||
479 | static void pmac_set_irq(ide_hwif_t *hwif, int on) | 479 | static void pmac_write_devctl(ide_hwif_t *hwif, u8 ctl) |
480 | { | 480 | { |
481 | u8 ctl = ATA_DEVCTL_OBS; | ||
482 | |||
483 | if (on == 4) { /* hack for SRST */ | ||
484 | ctl |= 4; | ||
485 | on &= ~4; | ||
486 | } | ||
487 | |||
488 | ctl |= on ? 0 : 2; | ||
489 | |||
490 | writeb(ctl, (void __iomem *)hwif->io_ports.ctl_addr); | 481 | writeb(ctl, (void __iomem *)hwif->io_ports.ctl_addr); |
491 | (void)readl((void __iomem *)(hwif->io_ports.data_addr | 482 | (void)readl((void __iomem *)(hwif->io_ports.data_addr |
492 | + IDE_TIMING_CONFIG)); | 483 | + IDE_TIMING_CONFIG)); |
@@ -954,8 +945,7 @@ static const struct ide_tp_ops pmac_tp_ops = { | |||
954 | .exec_command = pmac_exec_command, | 945 | .exec_command = pmac_exec_command, |
955 | .read_status = ide_read_status, | 946 | .read_status = ide_read_status, |
956 | .read_altstatus = ide_read_altstatus, | 947 | .read_altstatus = ide_read_altstatus, |
957 | 948 | .write_devctl = pmac_write_devctl, | |
958 | .set_irq = pmac_set_irq, | ||
959 | 949 | ||
960 | .tf_load = ide_tf_load, | 950 | .tf_load = ide_tf_load, |
961 | .tf_read = ide_tf_read, | 951 | .tf_read = ide_tf_read, |