aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/scc_pata.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-23 13:55:52 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-23 13:55:52 -0400
commit6e6afb3b7401f0181da74a1add57f126946b43e6 (patch)
tree2ca80a7fa25a387b5f3d479d9e94b1339ee440ac /drivers/ide/pci/scc_pata.c
parent1f6d8a0fd8f6cc5ee2219a8cf9b2da16dfd67397 (diff)
ide: add ->set_irq method
Add ->set_irq method for setting nIEN bit of ATA Device Control register and use it instead of ide_set_irq(). While at it: * Use ->set_irq in init_irq() and do_reset1(). * Don't use HWIF() macro in ide_check_pm_state(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/scc_pata.c')
-rw-r--r--drivers/ide/pci/scc_pata.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/ide/pci/scc_pata.c b/drivers/ide/pci/scc_pata.c
index a89dc4780786..727eda6db76c 100644
--- a/drivers/ide/pci/scc_pata.c
+++ b/drivers/ide/pci/scc_pata.c
@@ -149,6 +149,23 @@ static u8 scc_read_sff_dma_status(ide_hwif_t *hwif)
149 return (u8)in_be32((void *)(hwif->dma_base + 4)); 149 return (u8)in_be32((void *)(hwif->dma_base + 4));
150} 150}
151 151
152static void scc_set_irq(ide_hwif_t *hwif, int on)
153{
154 u8 ctl = ATA_DEVCTL_OBS;
155
156 if (on == 4) { /* hack for SRST */
157 ctl |= 4;
158 on &= ~4;
159 }
160
161 ctl |= on ? 0 : 2;
162
163 out_be32((void *)hwif->io_ports.ctl_addr, ctl);
164 eieio();
165 in_be32((void *)(hwif->dma_base + 0x01c));
166 eieio();
167}
168
152static void scc_ide_insw(unsigned long port, void *addr, u32 count) 169static void scc_ide_insw(unsigned long port, void *addr, u32 count)
153{ 170{
154 u16 *ptr = (u16 *)addr; 171 u16 *ptr = (u16 *)addr;
@@ -802,6 +819,8 @@ static void __devinit init_mmio_iops_scc(ide_hwif_t *hwif)
802 hwif->read_altstatus = scc_read_altstatus; 819 hwif->read_altstatus = scc_read_altstatus;
803 hwif->read_sff_dma_status = scc_read_sff_dma_status; 820 hwif->read_sff_dma_status = scc_read_sff_dma_status;
804 821
822 hwif->set_irq = scc_set_irq;
823
805 hwif->tf_load = scc_tf_load; 824 hwif->tf_load = scc_tf_load;
806 hwif->tf_read = scc_tf_read; 825 hwif->tf_read = scc_tf_read;
807 826