X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=drivers%2Fide%2Fpci%2Fsgiioc4.c;h=9d1a3038af9b717de7985803c28fdb365777dd55;hb=23579a2a170265aacf78069f4817a41c1d6e9323;hp=9046a69117ffce96c7814e80b06699c8d72c96bc;hpb=7616c0ad2087c7d244b8985390c63059a6223c45;p=deliverable%2Flinux.git diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c index 9046a69117ff..9d1a3038af9b 100644 --- a/drivers/ide/pci/sgiioc4.c +++ b/drivers/ide/pci/sgiioc4.c @@ -112,10 +112,9 @@ static void sgiioc4_maskproc(ide_drive_t * drive, int mask) { writeb(mask ? (drive->ctl | 2) : (drive->ctl & ~2), - (void __iomem *)IDE_CONTROL_REG); + (void __iomem *)drive->hwif->io_ports[IDE_CONTROL_OFFSET]); } - static int sgiioc4_checkirq(ide_hwif_t * hwif) { @@ -142,18 +141,18 @@ sgiioc4_clearirq(ide_drive_t * drive) intr_reg = readl((void __iomem *)other_ir); if (intr_reg & 0x03) { /* Valid IOC4-IDE interrupt */ /* - * Using sgiioc4_INB to read the IDE_STATUS_REG has a side effect - * of clearing the interrupt. The first read should clear it - * if it is set. The second read should return a "clear" status - * if it got cleared. If not, then spin for a bit trying to - * clear it. + * Using sgiioc4_INB to read the Status register has a side + * effect of clearing the interrupt. The first read should + * clear it if it is set. The second read should return + * a "clear" status if it got cleared. If not, then spin + * for a bit trying to clear it. */ - u8 stat = sgiioc4_INB(IDE_STATUS_REG); + u8 stat = sgiioc4_INB(hwif->io_ports[IDE_STATUS_OFFSET]); int count = 0; - stat = sgiioc4_INB(IDE_STATUS_REG); + stat = sgiioc4_INB(hwif->io_ports[IDE_STATUS_OFFSET]); while ((stat & 0x80) && (count++ < 100)) { udelay(1); - stat = sgiioc4_INB(IDE_STATUS_REG); + stat = sgiioc4_INB(hwif->io_ports[IDE_STATUS_OFFSET]); } if (intr_reg & 0x02) {