diff options
Diffstat (limited to 'drivers/ide/ppc/pmac.c')
-rw-r--r-- | drivers/ide/ppc/pmac.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c index 7c3a84f8fbed..a0d66480a797 100644 --- a/drivers/ide/ppc/pmac.c +++ b/drivers/ide/ppc/pmac.c | |||
@@ -502,6 +502,22 @@ static void pmac_exec_command(ide_hwif_t *hwif, u8 cmd) | |||
502 | + IDE_TIMING_CONFIG)); | 502 | + IDE_TIMING_CONFIG)); |
503 | } | 503 | } |
504 | 504 | ||
505 | static void pmac_set_irq(ide_hwif_t *hwif, int on) | ||
506 | { | ||
507 | u8 ctl = ATA_DEVCTL_OBS; | ||
508 | |||
509 | if (on == 4) { /* hack for SRST */ | ||
510 | ctl |= 4; | ||
511 | on &= ~4; | ||
512 | } | ||
513 | |||
514 | ctl |= on ? 0 : 2; | ||
515 | |||
516 | writeb(ctl, (void __iomem *)hwif->io_ports.ctl_addr); | ||
517 | (void)readl((void __iomem *)(hwif->io_ports.data_addr | ||
518 | + IDE_TIMING_CONFIG)); | ||
519 | } | ||
520 | |||
505 | /* | 521 | /* |
506 | * Old tuning functions (called on hdparm -p), sets up drive PIO timings | 522 | * Old tuning functions (called on hdparm -p), sets up drive PIO timings |
507 | */ | 523 | */ |
@@ -1100,6 +1116,7 @@ static int __devinit pmac_ide_setup_device(pmac_ide_hwif_t *pmif, hw_regs_t *hw) | |||
1100 | return -ENOENT; | 1116 | return -ENOENT; |
1101 | 1117 | ||
1102 | hwif->exec_command = pmac_exec_command; | 1118 | hwif->exec_command = pmac_exec_command; |
1119 | hwif->set_irq = pmac_set_irq; | ||
1103 | 1120 | ||
1104 | /* Setup MMIO ops */ | 1121 | /* Setup MMIO ops */ |
1105 | default_hwif_mmiops(hwif); | 1122 | default_hwif_mmiops(hwif); |