patch-2.3.1 linux/arch/mips/lib/ide-std.c

Next file: linux/arch/ppc/kernel/apus_setup.c
Previous file: linux/arch/mips/lib/ide-no.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.0/linux/arch/mips/lib/ide-std.c linux/arch/mips/lib/ide-std.c
@@ -11,6 +11,7 @@
  */
 #include <linux/hdreg.h>
 #include <asm/ptrace.h>
+#include <asm/hdreg.h>
 #include <asm/ide.h>
 
 static int std_ide_default_irq(ide_ioreg_t base)
@@ -41,15 +42,23 @@
 	}
 }
 
-static void std_ide_init_hwif_ports(ide_ioreg_t *p, ide_ioreg_t base,
-                                     int *irq)
+static void std_ide_init_hwif_ports (	hw_regs_t *hw,
+					ide_ioreg_t data_port,
+					ide_ioreg_t ctrl_port,
+					int *irq)
 {
-	ide_ioreg_t port = base;
-	int i = 8;
+	ide_ioreg_t reg = data_port;
+	int i;
 
-	while (i--)
-		*p++ = port++;
-	*p++ = base + 0x206;
+	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;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)