aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/sgiioc4.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-04-18 11:39:24 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-18 11:39:24 -0400
commit188da98800893691e47eea9335a234378e32aceb (patch)
tree57dbf491d23676e011b4946ec1867a6d55a02eef /drivers/ide/pci/sgiioc4.c
parent07fe944e87d79f8d7e1b090913fe9f2ace78f41d (diff)
parent273b8385e5817a4765f82257004c5ec661a6a5b2 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (58 commits) ide: remove ide_init_default_irq() macro ide: move default IDE ports setup to ide_generic host driver ide: remove obsoleted "idex=noprobe" kernel parameter (take 2) ide: remove needless hwif->irq check from ide_hwif_configure() ide: init hwif->{io_ports,irq} explicitly in legacy VLB host drivers ide: limit legacy VLB host drivers to alpha, x86 and mips cmd640: init hwif->{io_ports,irq} explicitly cmd640: cleanup setup_device_ptrs() ide: add ide-4drives host driver (take 3) ide: remove ppc ifdef from init_ide_data() ide: remove ide_default_io_ctl() macro ide: remove CONFIG_IDE_ARCH_OBSOLETE_INIT ide: add CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS (take 2) ppc/pmac: remove no longer needed IDE quirk ppc: don't include <linux/ide.h> ppc: remove ppc_ide_md ppc/pplus: remove ppc_ide_md.ide_init_hwif hook ppc/sandpoint: remove ppc_ide_md hooks ppc/lopec: remove ppc_ide_md hooks ppc/mpc8xx: remove ppc_ide_md hooks ...
Diffstat (limited to 'drivers/ide/pci/sgiioc4.c')
-rw-r--r--drivers/ide/pci/sgiioc4.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c
index 054626497be4..9d1a3038af9b 100644
--- a/drivers/ide/pci/sgiioc4.c
+++ b/drivers/ide/pci/sgiioc4.c
@@ -112,10 +112,9 @@ static void
112sgiioc4_maskproc(ide_drive_t * drive, int mask) 112sgiioc4_maskproc(ide_drive_t * drive, int mask)
113{ 113{
114 writeb(mask ? (drive->ctl | 2) : (drive->ctl & ~2), 114 writeb(mask ? (drive->ctl | 2) : (drive->ctl & ~2),
115 (void __iomem *)IDE_CONTROL_REG); 115 (void __iomem *)drive->hwif->io_ports[IDE_CONTROL_OFFSET]);
116} 116}
117 117
118
119static int 118static int
120sgiioc4_checkirq(ide_hwif_t * hwif) 119sgiioc4_checkirq(ide_hwif_t * hwif)
121{ 120{
@@ -142,18 +141,18 @@ sgiioc4_clearirq(ide_drive_t * drive)
142 intr_reg = readl((void __iomem *)other_ir); 141 intr_reg = readl((void __iomem *)other_ir);
143 if (intr_reg & 0x03) { /* Valid IOC4-IDE interrupt */ 142 if (intr_reg & 0x03) { /* Valid IOC4-IDE interrupt */
144 /* 143 /*
145 * Using sgiioc4_INB to read the IDE_STATUS_REG has a side effect 144 * Using sgiioc4_INB to read the Status register has a side
146 * of clearing the interrupt. The first read should clear it 145 * effect of clearing the interrupt. The first read should
147 * if it is set. The second read should return a "clear" status 146 * clear it if it is set. The second read should return
148 * if it got cleared. If not, then spin for a bit trying to 147 * a "clear" status if it got cleared. If not, then spin
149 * clear it. 148 * for a bit trying to clear it.
150 */ 149 */
151 u8 stat = sgiioc4_INB(IDE_STATUS_REG); 150 u8 stat = sgiioc4_INB(hwif->io_ports[IDE_STATUS_OFFSET]);
152 int count = 0; 151 int count = 0;
153 stat = sgiioc4_INB(IDE_STATUS_REG); 152 stat = sgiioc4_INB(hwif->io_ports[IDE_STATUS_OFFSET]);
154 while ((stat & 0x80) && (count++ < 100)) { 153 while ((stat & 0x80) && (count++ < 100)) {
155 udelay(1); 154 udelay(1);
156 stat = sgiioc4_INB(IDE_STATUS_REG); 155 stat = sgiioc4_INB(hwif->io_ports[IDE_STATUS_OFFSET]);
157 } 156 }
158 157
159 if (intr_reg & 0x02) { 158 if (intr_reg & 0x02) {
@@ -562,7 +561,6 @@ ide_init_sgiioc4(ide_hwif_t * hwif)
562 clear interrupts */ 561 clear interrupts */
563 hwif->maskproc = &sgiioc4_maskproc; /* Mask on/off NIEN register */ 562 hwif->maskproc = &sgiioc4_maskproc; /* Mask on/off NIEN register */
564 hwif->quirkproc = NULL; 563 hwif->quirkproc = NULL;
565 hwif->busproc = NULL;
566 564
567 hwif->INB = &sgiioc4_INB; 565 hwif->INB = &sgiioc4_INB;
568 566