aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/pci/sgiioc4.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c
index 43b96e298363..27c9eb989a9a 100644
--- a/drivers/ide/pci/sgiioc4.c
+++ b/drivers/ide/pci/sgiioc4.c
@@ -345,17 +345,17 @@ sgiioc4_resetproc(ide_drive_t * drive)
345static u8 345static u8
346sgiioc4_INB(unsigned long port) 346sgiioc4_INB(unsigned long port)
347{ 347{
348 u8 reg = (u8) inb(port); 348 u8 reg = (u8) readb((void __iomem *) port);
349 349
350 if ((port & 0xFFF) == 0x11C) { /* Status register of IOC4 */ 350 if ((port & 0xFFF) == 0x11C) { /* Status register of IOC4 */
351 if (reg & 0x51) { /* Not busy...check for interrupt */ 351 if (reg & 0x51) { /* Not busy...check for interrupt */
352 unsigned long other_ir = port - 0x110; 352 unsigned long other_ir = port - 0x110;
353 unsigned int intr_reg = (u32) inl(other_ir); 353 unsigned int intr_reg = (u32) readl((void __iomem *) other_ir);
354 354
355 /* Clear the Interrupt, Error bits on the IOC4 */ 355 /* Clear the Interrupt, Error bits on the IOC4 */
356 if (intr_reg & 0x03) { 356 if (intr_reg & 0x03) {
357 outl(0x03, other_ir); 357 writel(0x03, (void __iomem *) other_ir);
358 intr_reg = (u32) inl(other_ir); 358 intr_reg = (u32) readl((void __iomem *) other_ir);
359 } 359 }
360 } 360 }
361 } 361 }
@@ -606,6 +606,12 @@ ide_init_sgiioc4(ide_hwif_t * hwif)
606 hwif->ide_dma_host_off = &sgiioc4_ide_dma_host_off; 606 hwif->ide_dma_host_off = &sgiioc4_ide_dma_host_off;
607 hwif->ide_dma_lostirq = &sgiioc4_ide_dma_lostirq; 607 hwif->ide_dma_lostirq = &sgiioc4_ide_dma_lostirq;
608 hwif->ide_dma_timeout = &__ide_dma_timeout; 608 hwif->ide_dma_timeout = &__ide_dma_timeout;
609
610 /*
611 * The IOC4 uses MMIO rather than Port IO.
612 * It also needs special workarounds for INB.
613 */
614 default_hwif_mmiops(hwif);
609 hwif->INB = &sgiioc4_INB; 615 hwif->INB = &sgiioc4_INB;
610} 616}
611 617
@@ -743,6 +749,6 @@ ioc4_ide_exit(void)
743module_init(ioc4_ide_init); 749module_init(ioc4_ide_init);
744module_exit(ioc4_ide_exit); 750module_exit(ioc4_ide_exit);
745 751
746MODULE_AUTHOR("Aniket Malatpure - Silicon Graphics Inc. (SGI)"); 752MODULE_AUTHOR("Aniket Malatpure/Jeremy Higdon");
747MODULE_DESCRIPTION("IDE PCI driver module for SGI IOC4 Base-IO Card"); 753MODULE_DESCRIPTION("IDE PCI driver module for SGI IOC4 Base-IO Card");
748MODULE_LICENSE("GPL"); 754MODULE_LICENSE("GPL");