]> git.sur5r.net Git - u-boot/commitdiff
sunxi: simplify ACTLR.SMP bit set #ifdef
authorAndre Przywara <andre.przywara@arm.com>
Thu, 16 Feb 2017 01:20:21 +0000 (01:20 +0000)
committerJagan Teki <jagan@amarulasolutions.com>
Wed, 5 Apr 2017 09:33:17 +0000 (15:03 +0530)
Instead of enumerating all SoC families that need that bit set, let's
just express this more clearly: The SMP bits needs to be set on
SMP capable ARMv7 CPUs. It's much easier in Kconfig to express it the
other way round, so we use ! CPU_IS_UP and ! ARM64.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
arch/arm/Kconfig
arch/arm/mach-sunxi/board.c
board/sunxi/Kconfig

index e644ee3e1857b89226f5b903df514c2b2cdb8e0c..7b2075066237120a65d68064001d9fa03bb75f3d 100644 (file)
@@ -214,6 +214,10 @@ config ENABLE_ARM_SOC_BOOT0_HOOK
          ARM_SOC_BOOT0_HOOK which contains the required assembler
          preprocessor code.
 
+config ARM_CORTEX_CPU_IS_UP
+       bool
+       default n
+
 config USE_ARCH_MEMCPY
        bool "Use an assembly optimized implementation of memcpy"
        default y
index 58fbacb774cb7e136a3a7f0fe6304482f63a6bbb..fdcf68e93be8bf1acde8aa9c0ee3efd2f96fb469 100644 (file)
@@ -180,10 +180,7 @@ void s_init(void)
        /* No H3 BSP, boot0 seems to not modify SUNXI_SRAMC_BASE + 0x44 */
 #endif
 
-#if defined CONFIG_MACH_SUN6I || \
-    defined CONFIG_MACH_SUN7I || \
-    defined CONFIG_MACH_SUN8I || \
-    defined CONFIG_MACH_SUN9I
+#if !defined(CONFIG_ARM_CORTEX_CPU_IS_UP) && !defined(CONFIG_ARM64)
        /* Enable SMP mode for CPU0, by setting bit 6 of Auxiliary Ctl reg */
        asm volatile(
                "mrc p15, 0, r0, c1, c0, 1\n"
index 37b42521a4ef52f404f772e0c1a7f5a6a58e2805..ea0d6586fa4fdf2b73ca1b6655f11a2df62a89c7 100644 (file)
@@ -50,12 +50,14 @@ choice
 config MACH_SUN4I
        bool "sun4i (Allwinner A10)"
        select CPU_V7
+       select ARM_CORTEX_CPU_IS_UP
        select SUNXI_GEN_SUN4I
        select SUPPORT_SPL
 
 config MACH_SUN5I
        bool "sun5i (Allwinner A13)"
        select CPU_V7
+       select ARM_CORTEX_CPU_IS_UP
        select SUNXI_GEN_SUN4I
        select SUPPORT_SPL