Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/hpcarm/hpcarm WS003SH is normally reseted.



details:   https://anonhg.NetBSD.org/src/rev/b986999c9c87
branches:  trunk
changeset: 754368:b986999c9c87
user:      nonaka <nonaka%NetBSD.org@localhost>
date:      Thu Apr 29 01:54:26 2010 +0000

description:
WS003SH is normally reseted.

diffstat:

 sys/arch/hpcarm/hpcarm/hpc_machdep.c        |  10 ++++++----
 sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c |  19 ++++++++++++++++---
 2 files changed, 22 insertions(+), 7 deletions(-)

diffs (100 lines):

diff -r 17e5b2354f37 -r b986999c9c87 sys/arch/hpcarm/hpcarm/hpc_machdep.c
--- a/sys/arch/hpcarm/hpcarm/hpc_machdep.c      Wed Apr 28 23:46:37 2010 +0000
+++ b/sys/arch/hpcarm/hpcarm/hpc_machdep.c      Thu Apr 29 01:54:26 2010 +0000
@@ -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 */
 }
 
diff -r 17e5b2354f37 -r b986999c9c87 sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c
--- a/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c       Wed Apr 28 23:46:37 2010 +0000
+++ b/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c       Thu Apr 29 01:54:26 2010 +0000
@@ -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) {



Home | Main Index | Thread Index | Old Index