Module Name: src Committed By: nonaka Date: Thu Apr 29 01:54:26 UTC 2010
Modified Files: src/sys/arch/hpcarm/hpcarm: hpc_machdep.c pxa2x0_hpc_machdep.c Log Message: WS003SH is normally reseted. To generate a diff of this commit: cvs rdiff -u -r1.97 -r1.98 src/sys/arch/hpcarm/hpcarm/hpc_machdep.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/hpcarm/hpcarm/hpc_machdep.c diff -u src/sys/arch/hpcarm/hpcarm/hpc_machdep.c:1.97 src/sys/arch/hpcarm/hpcarm/hpc_machdep.c:1.98 --- src/sys/arch/hpcarm/hpcarm/hpc_machdep.c:1.97 Sat Apr 17 13:36:21 2010 +++ src/sys/arch/hpcarm/hpcarm/hpc_machdep.c Thu Apr 29 01:54:26 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: hpc_machdep.c,v 1.97 2010/04/17 13:36:21 nonaka Exp $ */ +/* $NetBSD: hpc_machdep.c,v 1.98 2010/04/29 01:54:26 nonaka Exp $ */ /* * Copyright (c) 1994-1998 Mark Brinicombe. @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hpc_machdep.c,v 1.97 2010/04/17 13:36:21 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hpc_machdep.c,v 1.98 2010/04/29 01:54:26 nonaka Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -89,6 +89,8 @@ void (*__sleep_func)(void *); void *__sleep_ctx; +void (*__cpu_reset)(void) = cpu_reset; + #ifdef BOOT_DUMP void dumppages(char *, int); #endif @@ -114,7 +116,7 @@ printf("Please press any key to reboot.\n\n"); cngetc(); printf("rebooting...\n"); - cpu_reset(); + __cpu_reset(); /* NOTREACHED */ } @@ -157,7 +159,7 @@ } printf("rebooting...\n"); - cpu_reset(); + __cpu_reset(); /* NOTREACHED */ } Index: src/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c diff -u src/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c:1.2 src/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c:1.3 --- src/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c:1.2 Sat Apr 24 21:52:34 2010 +++ src/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c Thu Apr 29 01:54:26 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pxa2x0_hpc_machdep.c,v 1.2 2010/04/24 21:52:34 nonaka Exp $ */ +/* $NetBSD: pxa2x0_hpc_machdep.c,v 1.3 2010/04/29 01:54:26 nonaka Exp $ */ /* * Copyright (c) 1994-1998 Mark Brinicombe. @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pxa2x0_hpc_machdep.c,v 1.2 2010/04/24 21:52:34 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pxa2x0_hpc_machdep.c,v 1.3 2010/04/29 01:54:26 nonaka Exp $"); #include "opt_ddb.h" #include "opt_dram_pages.h" @@ -185,6 +185,8 @@ extern void (*__sleep_func)(void *); extern void *__sleep_ctx; +extern void (*__cpu_reset)(void); + #ifdef DEBUG_BEFOREMMU static void fakecninit(void); #endif @@ -260,6 +262,15 @@ #undef _A #undef _S +static void +ws003sh_cpu_reset(void) +{ + + pxa2x0_gpio_set_function(89, GPIO_OUT | GPIO_SET); + for (;;) + continue; +} + static struct pxa2x0_gpioconf ws003sh_boarddep_gpioconf[] = { { 41, GPIO_ALT_FN_1_IN }, /* FFRXD */ { 99, GPIO_ALT_FN_3_OUT }, /* FFTXD */ @@ -392,8 +403,10 @@ || (bi->platid_machine == PLATID_MACH_SHARP_WZERO3_WS007SH) || (bi->platid_machine == PLATID_MACH_SHARP_WZERO3_WS011SH) || (bi->platid_machine == PLATID_MACH_SHARP_WZERO3_WS020SH)) { - if (bi->platid_machine == PLATID_MACH_SHARP_WZERO3_WS003SH) { + if (bi->platid_machine == PLATID_MACH_SHARP_WZERO3_WS003SH + || bi->platid_machine == PLATID_MACH_SHARP_WZERO3_WS004SH) { pxa2x0_gpio_config(ws003sh_gpioconf); + __cpu_reset = ws003sh_cpu_reset; } else if (bi->platid_machine == PLATID_MACH_SHARP_WZERO3_WS007SH) { pxa2x0_gpio_config(ws007sh_gpioconf); } else if (bi->platid_machine == PLATID_MACH_SHARP_WZERO3_WS011SH) {