Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Address 3rd issue in PR#43990.
details: https://anonhg.NetBSD.org/src/rev/91d9cd765c08
branches: trunk
changeset: 761593:91d9cd765c08
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Tue Feb 01 22:54:24 2011 +0000
description:
Address 3rd issue in PR#43990.
Different implementation but same method as suggested.
diffstat:
sys/arch/arm/marvell/mvsocreg.h | 6 +++++-
sys/arch/evbarm/marvell/marvell_machdep.c | 20 ++++++++++++++++----
2 files changed, 21 insertions(+), 5 deletions(-)
diffs (76 lines):
diff -r 2cc19f8ddf23 -r 91d9cd765c08 sys/arch/arm/marvell/mvsocreg.h
--- a/sys/arch/arm/marvell/mvsocreg.h Tue Feb 01 22:36:41 2011 +0000
+++ b/sys/arch/arm/marvell/mvsocreg.h Tue Feb 01 22:54:24 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mvsocreg.h,v 1.1 2010/10/03 05:49:24 kiyohara Exp $ */
+/* $NetBSD: mvsocreg.h,v 1.2 2011/02/01 22:54:24 jakllsch Exp $ */
/*
* Copyright (c) 2007, 2008 KIYOHARA Takashi
* All rights reserved.
@@ -102,7 +102,11 @@
#define MVSOC_MLMB_CPUCR 0x100 /* CPU Configuration Register */
#define MVSOC_MLMB_CPUCSR 0x104 /* CPU Control/Status Register*/
#define MVSOC_MLMB_RSTOUTNMASKR 0x108 /* RSTOUTn Mask Register */
+#define MVSOC_MLMB_RSTOUTNMASKR_PEXRSTOUTEN (1 << 0)
+#define MVSOC_MLMB_RSTOUTNMASKR_WDRSTOUTEN (1 << 1)
+#define MVSOC_MLMB_RSTOUTNMASKR_SOFTRSTOUTEN (1 << 2)
#define MVSOC_MLMB_SSRR 0x10c /* System Soft Reset Register */
+#define MVSOC_MLMB_SSRR_SYSTEMSOFTRST (1 << 0)
#define MVSOC_MLMB_MLMBICR 0x110 /*Mb-L to Mb Bridge Intr Cause*/
#define MVSOC_MLMB_MLMBIMR 0x114 /*Mb-L to Mb Bridge Intr Mask */
diff -r 2cc19f8ddf23 -r 91d9cd765c08 sys/arch/evbarm/marvell/marvell_machdep.c
--- a/sys/arch/evbarm/marvell/marvell_machdep.c Tue Feb 01 22:36:41 2011 +0000
+++ b/sys/arch/evbarm/marvell/marvell_machdep.c Tue Feb 01 22:54:24 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: marvell_machdep.c,v 1.2 2011/02/01 22:36:41 jakllsch Exp $ */
+/* $NetBSD: marvell_machdep.c,v 1.3 2011/02/01 22:54:24 jakllsch Exp $ */
/*
* Copyright (c) 2007, 2008, 2010 KIYOHARA Takashi
* All rights reserved.
@@ -25,7 +25,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: marvell_machdep.c,v 1.2 2011/02/01 22:36:41 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: marvell_machdep.c,v 1.3 2011/02/01 22:54:24 jakllsch Exp $");
#include "opt_evbarm_boardtype.h"
#include "opt_ddb.h"
@@ -175,6 +175,18 @@
static void marvell_startend_by_tag(int, uint64_t *, uint64_t *);
#endif
+static void
+marvell_system_reset(void)
+{
+ /* unmask soft reset */
+ write_mlmbreg(MVSOC_MLMB_RSTOUTNMASKR,
+ MVSOC_MLMB_RSTOUTNMASKR_SOFTRSTOUTEN);
+ /* assert soft reset */
+ write_mlmbreg(MVSOC_MLMB_SSRR, MVSOC_MLMB_SSRR_SYSTEMSOFTRST);
+ /* if we're still running, jump to the reset address */
+ cpu_reset();
+ /*NOTREACHED*/
+}
void
cpu_reboot(int howto, char *bootstr)
@@ -190,7 +202,7 @@
printf("Please press any key to reboot.\r\n");
cngetc();
printf("rebooting...\r\n");
- cpu_reset();
+ marvell_system_reset();
}
/*
@@ -223,7 +235,7 @@
}
printf("rebooting...\r\n");
- cpu_reset();
+ marvell_system_reset();
/*NOTREACHED*/
}
Home |
Main Index |
Thread Index |
Old Index