Module Name:    src
Committed By:   kiyohara
Date:           Wed Jan 29 04:27:26 UTC 2014

Modified Files:
        src/sys/arch/evbarm/marvell: marvell_machdep.c marvell_start.S

Log Message:
Abolish run time configuration for mapped address of SoC by u-boot.
This had become a cause hang-ups from some models.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/evbarm/marvell/marvell_machdep.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbarm/marvell/marvell_start.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/evbarm/marvell/marvell_machdep.c
diff -u src/sys/arch/evbarm/marvell/marvell_machdep.c:1.26 src/sys/arch/evbarm/marvell/marvell_machdep.c:1.27
--- src/sys/arch/evbarm/marvell/marvell_machdep.c:1.26	Mon Dec 23 04:12:09 2013
+++ src/sys/arch/evbarm/marvell/marvell_machdep.c	Wed Jan 29 04:27:26 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: marvell_machdep.c,v 1.26 2013/12/23 04:12:09 kiyohara Exp $ */
+/*	$NetBSD: marvell_machdep.c,v 1.27 2014/01/29 04:27:26 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.26 2013/12/23 04:12:09 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: marvell_machdep.c,v 1.27 2014/01/29 04:27:26 kiyohara Exp $");
 
 #include "opt_evbarm_boardtype.h"
 #include "opt_ddb.h"
@@ -202,12 +202,7 @@ read_ttb(void)
 static struct pmap_devmap marvell_devmap[] = {
 	{
 		MARVELL_INTERREGS_VBASE,
-#if (defined(ORION) || defined(KIRKWOOD) || defined(MV78XX0)) && \
-    defined(ARMADAXP)
-		_A(0x00000000),
-#else
 		_A(MARVELL_INTERREGS_PBASE),
-#endif
 		_S(MARVELL_INTERREGS_SIZE),
 		VM_PROT_READ|VM_PROT_WRITE,
 		PTE_NOCACHE,
@@ -245,17 +240,6 @@ initarm(void *arg)
 	if (set_cpufuncs())
 		panic("cpu not recognized!");
 
-#if (defined(ORION) || defined(KIRKWOOD) || defined(MV78XX0)) && \
-    defined(ARMADAXP)
-	int i;
-
-	for (i = 0; marvell_devmap[i].pd_size != 0; i++)
-		if (marvell_devmap[i].pd_va == MARVELL_INTERREGS_VBASE) {
-			marvell_devmap[i].pd_pa = _A(MARVELL_INTERREGS_PBASE);
-			break;
-		}
-#endif
-
 	/* map some peripheral registers */
 	pmap_devmap_bootstrap((vaddr_t)read_ttb(), marvell_devmap);
 

Index: src/sys/arch/evbarm/marvell/marvell_start.S
diff -u src/sys/arch/evbarm/marvell/marvell_start.S:1.4 src/sys/arch/evbarm/marvell/marvell_start.S:1.5
--- src/sys/arch/evbarm/marvell/marvell_start.S:1.4	Wed Oct  2 12:41:06 2013
+++ src/sys/arch/evbarm/marvell/marvell_start.S	Wed Jan 29 04:27:26 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: marvell_start.S,v 1.4 2013/10/02 12:41:06 kiyohara Exp $ */
+/*	$NetBSD: marvell_start.S,v 1.5 2014/01/29 04:27:26 kiyohara Exp $ */
 /*
  * Copyright (C) 2005, 2006 WIDE Project and SOUM Corporation.
  * All rights reserved.
@@ -63,9 +63,10 @@
 #include "opt_mvsoc.h"
 #include <machine/asm.h>
 #include <arm/armreg.h>
+#include <evbarm/marvell/marvellreg.h>
 #include "assym.h"
 
-RCSID("$NetBSD: marvell_start.S,v 1.4 2013/10/02 12:41:06 kiyohara Exp $")
+RCSID("$NetBSD: marvell_start.S,v 1.5 2014/01/29 04:27:26 kiyohara Exp $")
 
 #ifndef SDRAM_START
 #define SDRAM_START	0x00000000
@@ -135,35 +136,25 @@ sheeva_l2_disable:
 	nop
 	nop
 
-	/* Check SoC mapped address */
-	mov	r4, #0x1100
-	orr	r4, r4, #0x00ab		/* Marvell Vendor ID (0x11ab) */
-	adr	r5, marvell_interregs_pbase_list_start
-	adr	r6, marvell_interregs_pbase_list_end
-0:
-	cmp	r5, r6
-	beq	1f
-	ldmia	r5!, {r7}
-	add	r8, r7, #0x40000
-	ldr	r8, [r8]		/* Read vend/prod reg from PCI config */
-	bic	r8, r8, #0xff000000
-	bic	r8, r8, #0x00ff0000
-	cmp	r4, r8
-	bne	0b
-	adr	r6, marvell_interregs_pbase
-	str	r7, [r6]
 #if defined(MVSOC_FIXUP_DEVID) && MVSOC_FIXUP_DEVID > 0
+	adr	r6, marvell_interregs_pbase
+	ldr	r7, [r6]
+	add	r7, r7, #0x40000
+	ldr	r8, [r7]
+	bic	r8, r8, 0xff000000
+	bic	r8, r8, 0x00ff0000
 	/*
 	 * Some SoC returns ugly DeviceID.  Fixup it.
 	 */
 	adr	r5, devid
 	ldr	r5, [r5]
 	orr	r8, r8, r5, lsl #16
-	add	r7, r7, #0x40000
 	str	r8, [r7]
 	b	1f
 devid:
 	.word	MVSOC_FIXUP_DEVID
+marvell_interregs_pbase:
+	.word	MARVELL_INTERREGS_PBASE
 #endif
 1:
 
@@ -237,14 +228,6 @@ cores_start:
 	.word	0,			0
 cores_end:
 
-	.globl	_C_LABEL(marvell_interregs_pbase)
-marvell_interregs_pbase:
-	.word	0x00000000
-marvell_interregs_pbase_list_start:
-	.word	0xd0000000
-	.word	0xf1000000
-marvell_interregs_pbase_list_end:
-
 #define MMU_INIT(va,pa,n_sec,attr) \
 	.word	n_sec					    ; \
 	.word	4 * ((va) >> L1_S_SHIFT)		    ; \

Reply via email to