patch for ide_init_hwif_ports

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There is 'ide_init_hwif_ports' member in ide_ops structure but
currently never used.  This is a patch to use this (again).

---
Atsushi Nemoto
diff -ur linux.sgi/arch/mips/lib/ide-std.c linux/arch/mips/lib/ide-std.c
--- linux.sgi/arch/mips/lib/ide-std.c	Thu Jun 17 22:25:49 1999
+++ linux/arch/mips/lib/ide-std.c	Fri Aug 17 11:55:49 2001
@@ -60,6 +60,7 @@
 	}
 	if (irq != NULL)
 		*irq = 0;
+	hw->io_ports[IDE_IRQ_OFFSET] = 0;
 }
 
 static int std_ide_request_irq(unsigned int irq,
diff -ur linux.sgi/include/asm-mips/ide.h linux/include/asm-mips/ide.h
--- linux.sgi/include/asm-mips/ide.h	Tue Apr 24 02:46:11 2001
+++ linux/include/asm-mips/ide.h	Fri Aug 17 11:54:36 2001
@@ -56,21 +56,7 @@
 static inline void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port,
                                        ide_ioreg_t ctrl_port, int *irq)
 {
-	ide_ioreg_t reg = data_port;
-	int i;
-
-	for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
-		hw->io_ports[i] = reg;
-		reg += 1;
-	}
-	if (ctrl_port) {
-		hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
-	} else {
-		hw->io_ports[IDE_CONTROL_OFFSET] = hw->io_ports[IDE_DATA_OFFSET] + 0x206;
-	}
-	if (irq != NULL)
-		*irq = 0;
-	hw->io_ports[IDE_IRQ_OFFSET] = 0;
+	ide_ops->ide_init_hwif_ports(hw, data_port, ctrl_port, irq);
 }
 
 static __inline__ void ide_init_default_hwifs(void)

[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux