From: Paul M. <le...@us...> - 2001-10-28 23:04:22
|
Update of /cvsroot/linux-mips/linux/arch/mips/vr41xx/common In directory usw-pr-cvs1:/tmp/cvs-serv30742/arch/mips/vr41xx/common Added Files: Makefile reset.c Log Message: Merged Vr4111 (Clio-1000) patch from Jim Paris. --- NEW FILE: reset.c --- /* * VR41xx reset * * Copyright (C) 2000 Michael Klar * Copyright (C) 2001 Jim Paris <ji...@jt...> * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * */ #include <linux/kernel.h> #include <linux/init.h> #include <linux/config.h> #include <linux/delay.h> #include <linux/mm.h> #include <linux/sysctl.h> #include <linux/pm.h> #include <linux/acpi.h> #include <asm/vr41xx.h> #include <asm/cacheops.h> #include <asm/mipsregs.h> #include <asm/pgalloc.h> #include <asm/power.h> void vr41xx_restart(char *c) { void *reset_addr = (void *)0xbfc00000; /* * Try deadman's reset: set it to 1 second and wait for 2 */ *(volatile int *)VR41XX_DSUCLRREG = 1; /* clear last one */ *(volatile int *)VR41XX_DSUSETREG = 1; /* 1sec */ *(volatile int *)VR41XX_DSUCNTREG = 1; /* enable deadman switch */ mdelay(2000); /* wait 2 second */ /* * That didn't work, so try jumping to the start address */ goto *reset_addr; } |