Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/zaurus/zaurus To reset the watchdog timer in SL-C7x...
details: https://anonhg.NetBSD.org/src/rev/f46c9109ef06
branches: trunk
changeset: 780943:f46c9109ef06
user: nonaka <nonaka%NetBSD.org@localhost>
date: Sun Aug 12 17:25:32 2012 +0000
description:
To reset the watchdog timer in SL-C7x0/SL-C860.
diffstat:
sys/arch/zaurus/zaurus/machdep.c | 25 +++++++++++++++++++------
sys/arch/zaurus/zaurus/zaurus_reg.h | 5 +++--
2 files changed, 22 insertions(+), 8 deletions(-)
diffs (80 lines):
diff -r ab83cdee4a80 -r f46c9109ef06 sys/arch/zaurus/zaurus/machdep.c
--- a/sys/arch/zaurus/zaurus/machdep.c Sun Aug 12 17:24:59 2012 +0000
+++ b/sys/arch/zaurus/zaurus/machdep.c Sun Aug 12 17:25:32 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.31 2012/07/29 00:07:06 matt Exp $ */
+/* $NetBSD: machdep.c,v 1.32 2012/08/12 17:25:32 nonaka Exp $ */
/* $OpenBSD: zaurus_machdep.c,v 1.25 2006/06/20 18:24:04 todd Exp $ */
/*
@@ -107,7 +107,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.31 2012/07/29 00:07:06 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.32 2012/08/12 17:25:32 nonaka Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -163,6 +163,8 @@
#include <arm/xscale/pxa2x0var.h>
#include <arm/xscale/pxa2x0_gpio.h>
+#include <arm/sa11x0/sa11x0_ostvar.h>
+
#include <arch/zaurus/zaurus/zaurus_reg.h>
#include <arch/zaurus/zaurus/zaurus_var.h>
@@ -457,11 +459,16 @@
/* External reset circuit presumably asserts nRESET_GPIO. */
pxa2x0_gpio_set_function(89, GPIO_OUT | GPIO_SET);
- } else if (ZAURUS_ISC860) {
- /* XXX not yet */
- printf("zaurus_restart() for C7x0 is not implemented yet.\n");
+ } else {
+ /* SL-C7x0/SL-C860 */
+ /* Clear all reset status */
+ ioreg_write(ZAURUS_POWMAN_VBASE + POWMAN_RCSR,
+ POWMAN_HWR|POWMAN_WDR|POWMAN_SMR|POWMAN_GPR);
+
+ /* watchdog reset */
+ saost_reset();
}
- delay(1 * 1000* 1000); /* wait 1s */
+ delay(1 * 1000 * 1000); /* wait 1s */
}
static inline pd_entry_t *
@@ -546,6 +553,12 @@
_S(4 * COM_NPORTS),
VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE,
},
+ {
+ ZAURUS_POWMAN_VBASE,
+ _A(PXA2X0_POWMAN_BASE),
+ _S(PXA2X0_POWMAN_SIZE),
+ VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE,
+ },
{0, 0, 0, 0, 0,}
};
diff -r ab83cdee4a80 -r f46c9109ef06 sys/arch/zaurus/zaurus/zaurus_reg.h
--- a/sys/arch/zaurus/zaurus/zaurus_reg.h Sun Aug 12 17:24:59 2012 +0000
+++ b/sys/arch/zaurus/zaurus/zaurus_reg.h Sun Aug 12 17:25:32 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: zaurus_reg.h,v 1.4 2012/01/29 10:12:42 tsutsui Exp $ */
+/* $NetBSD: zaurus_reg.h,v 1.5 2012/08/12 17:25:32 nonaka Exp $ */
/* $OpenBSD: zaurus_reg.h,v 1.7 2005/12/14 14:39:38 uwe Exp $ */
/* NetBSD: lubbock_reg.h,v 1.1 2003/06/18 10:51:15 bsh Exp */
@@ -49,7 +49,8 @@
#define ZAURUS_FFUART_VBASE 0xfd600000
#define ZAURUS_BTUART_VBASE 0xfd700000
#define ZAURUS_STUART_VBASE 0xfd800000
-#define ZAURUS_VBASE_FREE 0xfd900000
+#define ZAURUS_POWMAN_VBASE 0xfd900000
+#define ZAURUS_VBASE_FREE 0xfda00000
#define ioreg_read(a) (*(volatile uint32_t *)(a))
#define ioreg_write(a,v) (*(volatile uint32_t *)(a)=(v))
Home |
Main Index |
Thread Index |
Old Index