Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch More devmap updates



details:   https://anonhg.NetBSD.org/src/rev/d8551654604a
branches:  trunk
changeset: 374363:d8551654604a
user:      skrll <skrll%NetBSD.org@localhost>
date:      Fri Apr 21 15:04:47 2023 +0000

description:
More devmap updates

diffstat:

 sys/arch/arm/at91/at91rm9200bus.c           |  21 +++--------
 sys/arch/arm/at91/at91sam9261bus.c          |  21 +++--------
 sys/arch/evbarm/armadaxp/armadaxp_machdep.c |  12 ++---
 sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c   |  54 +++++++++++-----------------
 4 files changed, 38 insertions(+), 70 deletions(-)

diffs (200 lines):

diff -r 72f9a9579591 -r d8551654604a sys/arch/arm/at91/at91rm9200bus.c
--- a/sys/arch/arm/at91/at91rm9200bus.c Fri Apr 21 15:00:27 2023 +0000
+++ b/sys/arch/arm/at91/at91rm9200bus.c Fri Apr 21 15:04:47 2023 +0000
@@ -1,7 +1,7 @@
-/*     $Id: at91rm9200bus.c,v 1.3 2023/04/21 15:00:48 skrll Exp $      */
+/*     $Id: at91rm9200bus.c,v 1.4 2023/04/21 15:04:47 skrll Exp $      */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: at91rm9200bus.c,v 1.3 2023/04/21 15:00:48 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: at91rm9200bus.c,v 1.4 2023/04/21 15:04:47 skrll Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -46,21 +46,12 @@ void at91rm9200bus_init(struct at91bus_c
 const struct pmap_devmap *at91rm9200bus_devmap(void)
 {
        static const struct pmap_devmap devmap[] = {
-           {
+           DEVMAP_ENTRY(
                AT91RM9200_APB_VBASE,
                AT91RM9200_APB_HWBASE,
-               AT91RM9200_APB_SIZE,
-               VM_PROT_READ | VM_PROT_WRITE,
-               PTE_NOCACHE
-           },
-
-           {
-               0,
-               0,
-               0,
-               0,
-               0
-           }
+               AT91RM9200_APB_SIZE
+           ),
+           DEVMAP_ENTRY_END
        };
 
        return devmap;
diff -r 72f9a9579591 -r d8551654604a sys/arch/arm/at91/at91sam9261bus.c
--- a/sys/arch/arm/at91/at91sam9261bus.c        Fri Apr 21 15:00:27 2023 +0000
+++ b/sys/arch/arm/at91/at91sam9261bus.c        Fri Apr 21 15:04:47 2023 +0000
@@ -1,7 +1,7 @@
-/*     $Id: at91sam9261bus.c,v 1.3 2023/04/21 15:00:48 skrll Exp $     */
+/*     $Id: at91sam9261bus.c,v 1.4 2023/04/21 15:04:47 skrll Exp $     */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: at91sam9261bus.c,v 1.3 2023/04/21 15:00:48 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: at91sam9261bus.c,v 1.4 2023/04/21 15:04:47 skrll Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -46,21 +46,12 @@ void at91sam9261bus_init(struct at91bus_
 const struct pmap_devmap *at91sam9261bus_devmap(void)
 {
        static const struct pmap_devmap devmap[] = {
-           {
+           DEVMAP_ENTRY(
                AT91SAM9261_APB_VBASE,
                AT91SAM9261_APB_HWBASE,
-               AT91SAM9261_APB_SIZE,
-               VM_PROT_READ | VM_PROT_WRITE,
-               PTE_NOCACHE
-           },
-
-           {
-               0,
-               0,
-               0,
-               0,
-               0
-           }
+               AT91SAM9261_APB_SIZE
+           ),
+           DEVMAP_ENTRY_END
        };
 
        return devmap;
diff -r 72f9a9579591 -r d8551654604a sys/arch/evbarm/armadaxp/armadaxp_machdep.c
--- a/sys/arch/evbarm/armadaxp/armadaxp_machdep.c       Fri Apr 21 15:00:27 2023 +0000
+++ b/sys/arch/evbarm/armadaxp/armadaxp_machdep.c       Fri Apr 21 15:04:47 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: armadaxp_machdep.c,v 1.18 2023/04/20 08:28:03 skrll Exp $      */
+/*     $NetBSD: armadaxp_machdep.c,v 1.19 2023/04/21 15:04:47 skrll Exp $      */
 /*******************************************************************************
 Copyright (C) Marvell International Ltd. and its affiliates
 
@@ -37,7 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
 *******************************************************************************/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: armadaxp_machdep.c,v 1.18 2023/04/20 08:28:03 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: armadaxp_machdep.c,v 1.19 2023/04/21 15:04:47 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_console.h"
@@ -188,11 +188,9 @@ axp_system_reset(void)
  */
 
 static const struct pmap_devmap devmap[] = {
-       DEVMAP_ENTRY_FLAGS(MARVELL_INTERREGS_VBASE,
-                          MARVELL_INTERREGS_PBASE,
-                          MVSOC_INTERREGS_SIZE,
-                          VM_PROT_READ | VM_PROT_WRITE,
-                          PMAP_NOCACHE),
+       DEVMAP_ENTRY(MARVELL_INTERREGS_VBASE,
+                    MARVELL_INTERREGS_PBASE,
+                    MVSOC_INTERREGS_SIZE),
        DEVMAP_ENTRY_END
 };
 
diff -r 72f9a9579591 -r d8551654604a sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c
--- a/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c Fri Apr 21 15:00:27 2023 +0000
+++ b/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c Fri Apr 21 15:04:47 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bcm53xx_machdep.c,v 1.27 2021/03/20 05:58:22 skrll Exp $       */
+/*     $NetBSD: bcm53xx_machdep.c,v 1.28 2023/04/21 15:04:47 skrll Exp $       */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #define IDM_PRIVATE
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm53xx_machdep.c,v 1.27 2021/03/20 05:58:22 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm53xx_machdep.c,v 1.28 2023/04/21 15:04:47 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_console.h"
@@ -148,51 +148,39 @@ static struct consdev earlycons = {
  */
 
 static const struct pmap_devmap devmap[] = {
-       {
+       DEVMAP_ENTRY(
                KERNEL_IO_IOREG_VBASE,
                BCM53XX_IOREG_PBASE,            /* 0x18000000 */
-               BCM53XX_IOREG_SIZE,             /* 2MB */
-               VM_PROT_READ|VM_PROT_WRITE,
-               PTE_NOCACHE,
-       },
-       {
+               BCM53XX_IOREG_SIZE              /* 2MB */
+       ),
+       DEVMAP_ENTRY(
                KERNEL_IO_ARMCORE_VBASE,
                BCM53XX_ARMCORE_PBASE,          /* 0x19000000 */
-               BCM53XX_ARMCORE_SIZE,           /* 1MB */
-               VM_PROT_READ|VM_PROT_WRITE,
-               PTE_NOCACHE,
-       },
-       {
+               BCM53XX_ARMCORE_SIZE            /* 1MB */
+       ),
+       DEVMAP_ENTRY(
                KERNEL_IO_ROM_REGION_VBASE,
                BCM53XX_ROM_REGION_PBASE,       /* 0xfff00000 */
-               BCM53XX_ROM_REGION_SIZE,        /* 1MB */
-               VM_PROT_READ|VM_PROT_WRITE,
-               PTE_NOCACHE,
-       },
+               BCM53XX_ROM_REGION_SIZE         /* 1MB */
+       ),
 #if NPCI > 0
-       {
+       DEVMAP_ENTRY(
                KERNEL_IO_PCIE0_OWIN_VBASE,
                BCM53XX_PCIE0_OWIN_PBASE,       /* 0x08000000 */
-               BCM53XX_PCIE0_OWIN_SIZE,        /* 4MB */
-               VM_PROT_READ|VM_PROT_WRITE,
-               PTE_NOCACHE,
-       },
-       {
+               BCM53XX_PCIE0_OWIN_SIZE         /* 4MB */
+       ),
+       DEVMAP_ENTRY(
                KERNEL_IO_PCIE1_OWIN_VBASE,
                BCM53XX_PCIE1_OWIN_PBASE,       /* 0x40000000 */
-               BCM53XX_PCIE1_OWIN_SIZE,        /* 4MB */
-               VM_PROT_READ|VM_PROT_WRITE,
-               PTE_NOCACHE,
-       },
-       {
+               BCM53XX_PCIE1_OWIN_SIZE         /* 4MB */
+       ),
+       DEVMAP_ENTRY(
                KERNEL_IO_PCIE2_OWIN_VBASE,
                BCM53XX_PCIE2_OWIN_PBASE,       /* 0x48000000 */
-               BCM53XX_PCIE2_OWIN_SIZE,        /* 4MB */
-               VM_PROT_READ|VM_PROT_WRITE,
-               PTE_NOCACHE,
-       },
+               BCM53XX_PCIE2_OWIN_SIZE         /* 4MB */
+       ),
 #endif /* NPCI > 0 */
-       { 0, 0, 0, 0, 0 }
+       DEVMAP_ENTRY_END
 };
 
 static const struct boot_physmem bp_first256 = {



Home | Main Index | Thread Index | Old Index