Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/evbarm/marvell Rename marvell_system_reset_old from...
details: https://anonhg.NetBSD.org/src/rev/38ba7e3c2fdd
branches: trunk
changeset: 791481:38ba7e3c2fdd
user: kiyohara <kiyohara%NetBSD.org@localhost>
date: Wed Nov 20 12:59:21 2013 +0000
description:
Rename marvell_system_reset_old from marvell_system_reset.
And add reset function for ArmadaXP. It named marvell_system_reset.
diffstat:
sys/arch/evbarm/marvell/marvell_machdep.c | 38 ++++++++++++++++++++++++++----
1 files changed, 32 insertions(+), 6 deletions(-)
diffs (107 lines):
diff -r f2425b591882 -r 38ba7e3c2fdd sys/arch/evbarm/marvell/marvell_machdep.c
--- a/sys/arch/evbarm/marvell/marvell_machdep.c Wed Nov 20 12:52:24 2013 +0000
+++ b/sys/arch/evbarm/marvell/marvell_machdep.c Wed Nov 20 12:59:21 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: marvell_machdep.c,v 1.23 2013/11/20 12:52:24 kiyohara Exp $ */
+/* $NetBSD: marvell_machdep.c,v 1.24 2013/11/20 12:59:21 kiyohara 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.23 2013/11/20 12:52:24 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: marvell_machdep.c,v 1.24 2013/11/20 12:59:21 kiyohara Exp $");
#include "opt_evbarm_boardtype.h"
#include "opt_ddb.h"
@@ -132,20 +132,41 @@
static void marvell_startend_by_tag(int, uint64_t *, uint64_t *);
#endif
+#if defined(ORION) || defined(KIRKWOOD) || defined(MV78XX0)
static void
-marvell_system_reset(void)
+marvell_system_reset_old(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_address = 0;
cpu_reset_address_paddr = 0xffff0000;
cpu_reset();
/*NOTREACHED*/
}
+#endif
+
+#if defined(ARMADAXP)
+static void
+marvell_system_reset(void)
+{
+
+ /* Unmask soft reset */
+ write_miscreg(MVSOC_MISC_RSTOUTNMASKR,
+ MVSOC_MISC_RSTOUTNMASKR_GLOBALSOFTRSTOUTEN);
+ /* Assert soft reset */
+ write_miscreg(MVSOC_MISC_SSRR, MVSOC_MISC_SSRR_GLOBALSOFTRST);
+
+ while (1);
+
+ /*NOTREACHED*/
+}
+#endif
+
static inline
pd_entry_t *
@@ -213,9 +234,6 @@
uint32_t target, attr, base, size;
int cs, memtag = 0, iotag = 0, window;
- /* Use the mapped reset routine! */
- cpu_reset_address = marvell_system_reset;
-
mvsoc_bootstrap(MARVELL_INTERREGS_VBASE);
/*
@@ -265,6 +283,8 @@
case MARVELL_ORION_1_88W8660:
case MARVELL_ORION_2_88F1281:
case MARVELL_ORION_2_88F5281:
+ cpu_reset_address = marvell_system_reset_old;
+
orion_intr_bootstrap();
memtag = ORION_TAG_PEX0_MEM;
@@ -281,6 +301,8 @@
case MARVELL_KIRKWOOD_88F6192:
case MARVELL_KIRKWOOD_88F6281:
case MARVELL_KIRKWOOD_88F6282:
+ cpu_reset_address = marvell_system_reset_old;
+
kirkwood_intr_bootstrap();
memtag = KIRKWOOD_TAG_PEX_MEM;
@@ -295,6 +317,8 @@
#ifdef MV78XX0
case MARVELL_MV78XX0_MV78100:
case MARVELL_MV78XX0_MV78200:
+ cpu_reset_address = marvell_system_reset_old;
+
mv78xx0_intr_bootstrap();
memtag = MV78XX0_TAG_PEX0_MEM;
@@ -312,6 +336,8 @@
case MARVELL_ARMADAXP_MV78230:
case MARVELL_ARMADAXP_MV78260:
case MARVELL_ARMADAXP_MV78460:
+ cpu_reset_address = marvell_system_reset;
+
armadaxp_intr_bootstrap(MARVELL_INTERREGS_PBASE);
memtag = ARMADAXP_TAG_PEX00_MEM;
Home |
Main Index |
Thread Index |
Old Index