patch-2.4.22 linux-2.4.22/arch/mips/au1000/common/reset.c

Next file: linux-2.4.22/arch/mips/au1000/common/serial.c
Previous file: linux-2.4.22/arch/mips/au1000/common/puts.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.21/arch/mips/au1000/common/reset.c linux-2.4.22/arch/mips/au1000/common/reset.c
@@ -42,7 +42,7 @@
 void au1000_restart(char *command)
 {
 	/* Set all integrated peripherals to disabled states */
-	u32 prid = read_32bit_cp0_register(CP0_PRID);
+	u32 prid = read_c0_prid();
 
 	printk(KERN_NOTICE "\n** Resetting Integrated Peripherals\n");
 	switch (prid & 0xFF000000)
@@ -107,10 +107,17 @@
 		break;
 	}
 
-	set_cp0_status(ST0_BEV | ST0_ERL);
-	set_cp0_config(CONF_CM_UNCACHED);
+	set_c0_status(ST0_BEV | ST0_ERL);
+	set_c0_config(CONF_CM_UNCACHED);
 	flush_cache_all();
-	write_32bit_cp0_register(CP0_WIRED, 0);
+	write_c0_wired(0);
+
+#if defined(CONFIG_MIPS_PB1500) || defined(CONFIG_MIPS_PB1100) || defined(CONFIG_MIPS_DB1000) || defined(CONFIG_MIPS_DB1100) || defined(CONFIG_MIPS_DB1500)
+	/* Do a HW reset if the board can do it */
+
+	au_writel(0x00000000, 0xAE00001C);
+#endif
+
 	__asm__ __volatile__("jr\t%0"::"r"(0xbfc00000));
 }
 

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