patch-2.4.25 linux-2.4.25/arch/mips/sgi-ip22/ip22-hpc.c

Next file: linux-2.4.25/arch/mips/sgi-ip22/ip22-int.c
Previous file: linux-2.4.25/arch/mips/sgi-ip22/Makefile
Back to the patch index
Back to the overall index

diff -urN linux-2.4.24/arch/mips/sgi-ip22/ip22-hpc.c linux-2.4.25/arch/mips/sgi-ip22/ip22-hpc.c
@@ -8,7 +8,7 @@
 #include <linux/init.h>
 #include <linux/types.h>
 
-#include <asm/addrspace.h>
+#include <asm/io.h>
 #include <asm/sgi/hpc3.h>
 #include <asm/sgi/ioc.h>
 #include <asm/sgi/ip22.h>
@@ -23,8 +23,11 @@
 
 void __init sgihpc_init(void)
 {
-	hpc3c0 = (struct hpc3_regs *)(KSEG1 + HPC3_CHIP0_BASE);
-	hpc3c1 = (struct hpc3_regs *)(KSEG1 + HPC3_CHIP1_BASE);
+	/* ioremap can't fail */
+	hpc3c0 = (struct hpc3_regs *)
+		 ioremap(HPC3_CHIP0_BASE, sizeof(struct hpc3_regs));
+	hpc3c1 = (struct hpc3_regs *)
+		 ioremap(HPC3_CHIP1_BASE, sizeof(struct hpc3_regs));
 	/* IOC lives in PBUS PIO channel 6 */
 	sgioc = (struct sgioc_regs *)hpc3c0->pbus_extregs[6];
 

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