Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/ti Place devmap above KERNEL_IO_VBASE



details:   https://anonhg.NetBSD.org/src/rev/860ad9c0acc3
branches:  trunk
changeset: 1004381:860ad9c0acc3
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sun Oct 27 17:58:42 2019 +0000

description:
Place devmap above KERNEL_IO_VBASE

diffstat:

 sys/arch/arm/ti/ti_platform.c |  24 +++++++++---------------
 1 files changed, 9 insertions(+), 15 deletions(-)

diffs (63 lines):

diff -r eefab1629342 -r 860ad9c0acc3 sys/arch/arm/ti/ti_platform.c
--- a/sys/arch/arm/ti/ti_platform.c     Sun Oct 27 17:21:23 2019 +0000
+++ b/sys/arch/arm/ti/ti_platform.c     Sun Oct 27 17:58:42 2019 +0000
@@ -1,9 +1,9 @@
-/* $NetBSD: ti_platform.c,v 1.7 2019/10/26 15:58:15 jmcneill Exp $ */
+/* $NetBSD: ti_platform.c,v 1.8 2019/10/27 17:58:42 jmcneill Exp $ */
 
 #include "opt_console.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ti_platform.c,v 1.7 2019/10/26 15:58:15 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ti_platform.c,v 1.8 2019/10/27 17:58:42 jmcneill Exp $");
 
 #include <sys/param.h>
 
@@ -14,6 +14,8 @@
 
 #include <dev/ic/comreg.h>
 
+#include <arch/evbarm/fdt/platform.h>
+
 extern struct bus_space armv7_generic_bs_tag;
 extern struct bus_space armv7_generic_a4x_bs_tag;
 extern struct arm32_bus_dma_tag arm_generic_dma_tag;
@@ -41,9 +43,9 @@
 am33xx_platform_devmap(void)
 {
        static const struct pmap_devmap devmap[] = {
-               DEVMAP_ENTRY(0xe4c00000, 0x44c00000, 0x00400000),
-               DEVMAP_ENTRY(0xe8000000, 0x48000000, 0x01000000),
-               DEVMAP_ENTRY(0xea000000, 0x4a000000, 0x01000000),
+               DEVMAP_ENTRY(KERNEL_IO_VBASE | 0x04c00000, 0x44c00000, 0x00400000),
+               DEVMAP_ENTRY(KERNEL_IO_VBASE | 0x08000000, 0x48000000, 0x01000000),
+               DEVMAP_ENTRY(KERNEL_IO_VBASE | 0x0a000000, 0x4a000000, 0x01000000),
                DEVMAP_ENTRY_END
        };
 
@@ -120,10 +122,10 @@
        prev = bus_space_read_4(bst, bsh, 0x3c);
        while (ticks > 0) {
                cur = bus_space_read_4(bst, bsh, 0x3c);
-               if (cur > prev)
+               if (cur >= prev)
                        ticks -= (cur - prev);
                else
-                       ticks -= (UINT32_MAX - prev + 1 - cur);
+                       ticks -= (UINT32_MAX - cur + prev);
                prev = cur;
        }
 }
@@ -136,12 +138,4 @@
        .ap_delay = am33xx_platform_delay,
 };
 
-void dummysetstatclockrate(int);
-void
-dummysetstatclockrate(int newhz)
-{
-}
-__weak_alias(setstatclockrate, dummysetstatclockrate);
-
 ARM_PLATFORM(am33xx, "ti,am33xx", &am33xx_platform);
-



Home | Main Index | Thread Index | Old Index