Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/nvidia Use arm_generic_bs_tag instead of armv7_...



details:   https://anonhg.NetBSD.org/src/rev/4541772d6802
branches:  trunk
changeset: 324486:4541772d6802
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sat Jul 07 20:16:16 2018 +0000

description:
Use arm_generic_bs_tag instead of armv7_generic_bs_tag and conditionally
define SOC platform support (so we don't try to build 32-bit support into
64-bit kernels).

diffstat:

 sys/arch/arm/nvidia/soc_tegra124.c   |   6 +++---
 sys/arch/arm/nvidia/soc_tegra210.c   |  10 ++++++----
 sys/arch/arm/nvidia/tegra_platform.c |  15 +++++++++++++--
 sys/arch/arm/nvidia/tegra_var.h      |   6 +++---
 4 files changed, 25 insertions(+), 12 deletions(-)

diffs (173 lines):

diff -r 7b9c8cba6bde -r 4541772d6802 sys/arch/arm/nvidia/soc_tegra124.c
--- a/sys/arch/arm/nvidia/soc_tegra124.c        Sat Jul 07 15:44:27 2018 +0000
+++ b/sys/arch/arm/nvidia/soc_tegra124.c        Sat Jul 07 20:16:16 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: soc_tegra124.c,v 1.17 2017/04/23 12:31:38 jmcneill Exp $ */
+/* $NetBSD: soc_tegra124.c,v 1.18 2018/07/07 20:16:16 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -30,7 +30,7 @@
 #include "opt_multiprocessor.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: soc_tegra124.c,v 1.17 2017/04/23 12:31:38 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: soc_tegra124.c,v 1.18 2018/07/07 20:16:16 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -54,7 +54,7 @@
 {
 #if defined(MULTIPROCESSOR)
        extern void cortex_mpstart(void);
-       bus_space_tag_t bst = &armv7_generic_bs_tag;
+       bus_space_tag_t bst = &arm_generic_bs_tag;
        bus_space_handle_t bsh;
 
        bus_space_subregion(bst, tegra_ppsb_bsh,
diff -r 7b9c8cba6bde -r 4541772d6802 sys/arch/arm/nvidia/soc_tegra210.c
--- a/sys/arch/arm/nvidia/soc_tegra210.c        Sat Jul 07 15:44:27 2018 +0000
+++ b/sys/arch/arm/nvidia/soc_tegra210.c        Sat Jul 07 20:16:16 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: soc_tegra210.c,v 1.1 2017/05/25 23:26:48 jmcneill Exp $ */
+/* $NetBSD: soc_tegra210.c,v 1.2 2018/07/07 20:16:16 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -30,18 +30,20 @@
 #include "opt_multiprocessor.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: soc_tegra210.c,v 1.1 2017/05/25 23:26:48 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: soc_tegra210.c,v 1.2 2018/07/07 20:16:16 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
 #include <sys/cpu.h>
 #include <sys/device.h>
+#include <sys/atomic.h>
 
 #include <uvm/uvm_extern.h>
 
 #include <dev/fdt/fdtvar.h>
 
 #include <arm/cpufunc.h>
+#include <arm/locore.h>
 
 #include <arm/nvidia/tegra_reg.h>
 #include <arm/nvidia/tegra_pmcreg.h>
@@ -54,7 +56,7 @@
 {
 #if defined(MULTIPROCESSOR)
        extern void cortex_mpstart(void);
-       bus_space_tag_t bst = &armv7_generic_bs_tag;
+       bus_space_tag_t bst = &arm_generic_bs_tag;
        bus_space_handle_t bsh;
 
        bus_space_subregion(bst, tegra_ppsb_bsh,
@@ -73,7 +75,7 @@
        tegra_pmc_power(PMC_PARTID_CPU3, true); started |= __BIT(3);
 
        for (u_int i = 0x10000000; i > 0; i--) {
-               arm_dmb();
+               membar_consumer();
                if (arm_cpu_hatched == started)
                        break;
        }
diff -r 7b9c8cba6bde -r 4541772d6802 sys/arch/arm/nvidia/tegra_platform.c
--- a/sys/arch/arm/nvidia/tegra_platform.c      Sat Jul 07 15:44:27 2018 +0000
+++ b/sys/arch/arm/nvidia/tegra_platform.c      Sat Jul 07 20:16:16 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_platform.c,v 1.11 2018/04/01 04:35:04 ryo Exp $ */
+/* $NetBSD: tegra_platform.c,v 1.12 2018/07/07 20:16:16 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -33,7 +33,7 @@
 #include "ukbd.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tegra_platform.c,v 1.11 2018/04/01 04:35:04 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_platform.c,v 1.12 2018/07/07 20:16:16 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -54,6 +54,9 @@
 
 #include <arm/fdt/arm_fdtvar.h>
 
+#include <arm/arm/psci.h>
+#include <arm/fdt/psci_fdt.h>
+
 #if NUKBD > 0
 #include <dev/usb/ukbdvar.h>
 #endif
@@ -87,6 +90,7 @@
        return devmap;
 }
 
+#ifdef SOC_TEGRA124
 static void
 tegra124_platform_bootstrap(void)
 {
@@ -96,7 +100,9 @@
        tegra124_mpinit();
 #endif
 }
+#endif
 
+#ifdef SOC_TEGRA210
 static void
 tegra210_platform_bootstrap(void)
 {
@@ -106,6 +112,7 @@
        tegra210_mpinit();
 #endif
 }
+#endif
 
 static void
 tegra_platform_init_attach_args(struct fdt_attach_args *faa)
@@ -204,6 +211,7 @@
        return PLLP_OUT0_FREQ;
 }
 
+#ifdef SOC_TEGRA124
 static const struct arm_platform tegra124_platform = {
        .devmap = tegra_platform_devmap,
        .bootstrap = tegra124_platform_bootstrap,
@@ -216,7 +224,9 @@
 };
 
 ARM_PLATFORM(tegra124, "nvidia,tegra124", &tegra124_platform);
+#endif
 
+#ifdef SOC_TEGRA210
 static const struct arm_platform tegra210_platform = {
        .devmap = tegra_platform_devmap,
        .bootstrap = tegra210_platform_bootstrap,
@@ -229,3 +239,4 @@
 };
 
 ARM_PLATFORM(tegra210, "nvidia,tegra210", &tegra210_platform);
+#endif
diff -r 7b9c8cba6bde -r 4541772d6802 sys/arch/arm/nvidia/tegra_var.h
--- a/sys/arch/arm/nvidia/tegra_var.h   Sat Jul 07 15:44:27 2018 +0000
+++ b/sys/arch/arm/nvidia/tegra_var.h   Sat Jul 07 20:16:16 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_var.h,v 1.42 2017/09/24 20:09:53 jmcneill Exp $ */
+/* $NetBSD: tegra_var.h,v 1.43 2018/07/07 20:16:16 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -35,8 +35,8 @@
 
 #include "opt_tegra.h"
 
-extern struct bus_space armv7_generic_bs_tag;
-extern struct bus_space armv7_generic_a4x_bs_tag;
+extern struct bus_space arm_generic_bs_tag;
+extern struct bus_space arm_generic_a4x_bs_tag;
 extern bus_space_handle_t tegra_ppsb_bsh;
 extern bus_space_handle_t tegra_apb_bsh;
 



Home | Main Index | Thread Index | Old Index