summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2006-07-29 16:08:21 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2006-07-29 16:08:21 +0000
commit7be8c12978f2b3f6aaf65e85a36ba1b0a634b759 (patch)
treea050cd99c670221c7894275456cb632198cdbe96
parent47d3c1200f3756e901534b59a0db251673b8eb1c (diff)
Make _rtt reset the machine.
-rw-r--r--sys/arch/armish/stand/boot/machdep.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/arch/armish/stand/boot/machdep.c b/sys/arch/armish/stand/boot/machdep.c
index d23a1f45380..dbd33e526ad 100644
--- a/sys/arch/armish/stand/boot/machdep.c
+++ b/sys/arch/armish/stand/boot/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.1 2006/07/29 15:01:49 kettenis Exp $ */
+/* $OpenBSD: machdep.c,v 1.2 2006/07/29 16:08:20 kettenis Exp $ */
/*
* Copyright (c) 2006 Mark Kettenis
@@ -25,9 +25,13 @@
#define ATU_OIOWTVR 0xffffe15c
#define ATU_ATUCR 0xffffe180
+#define ATU_PCSR 0xffffe184
#define ATUCR_OUT_EN (1U << 1)
+#define PCSR_RIB (1U << 5)
+#define PCSR_RPB (1U << 4)
+
void
machdep(void)
{
@@ -64,6 +68,8 @@ main(void)
void
_rtt(void)
{
- printf("halted...");
+ *((volatile uint32_t *)(ATU_PCSR)) = PCSR_RIB | PCSR_RPB;
+
+ printf("RESET FAILED\n");
for (;;) ;
}