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 Abolish run time configuration for m...



details:   https://anonhg.NetBSD.org/src/rev/2ab14941f9f9
branches:  trunk
changeset: 793173:2ab14941f9f9
user:      kiyohara <kiyohara%NetBSD.org@localhost>
date:      Wed Jan 29 04:27:26 2014 +0000

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

diffstat:

 sys/arch/evbarm/marvell/marvell_machdep.c |  20 +--------------
 sys/arch/evbarm/marvell/marvell_start.S   |  39 ++++++++----------------------
 2 files changed, 13 insertions(+), 46 deletions(-)

diffs (129 lines):

diff -r 6d80ee04f8ac -r 2ab14941f9f9 sys/arch/evbarm/marvell/marvell_machdep.c
--- a/sys/arch/evbarm/marvell/marvell_machdep.c Wed Jan 29 02:38:48 2014 +0000
+++ b/sys/arch/evbarm/marvell/marvell_machdep.c Wed Jan 29 04:27:26 2014 +0000
@@ -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 @@
 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 @@
        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);
 
diff -r 6d80ee04f8ac -r 2ab14941f9f9 sys/arch/evbarm/marvell/marvell_start.S
--- a/sys/arch/evbarm/marvell/marvell_start.S   Wed Jan 29 02:38:48 2014 +0000
+++ b/sys/arch/evbarm/marvell/marvell_start.S   Wed Jan 29 04:27:26 2014 +0000
@@ -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 @@
        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
+#if defined(MVSOC_FIXUP_DEVID) && MVSOC_FIXUP_DEVID > 0
        adr     r6, marvell_interregs_pbase
-       str     r7, [r6]
-#if defined(MVSOC_FIXUP_DEVID) && MVSOC_FIXUP_DEVID > 0
+       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 @@
        .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)                    ; \



Home | Main Index | Thread Index | Old Index