arm: exynos7420: remove custome low level init function
Subsystems (3)
PATCH 1/1 arm: exynos7420: remove custome low level init function
From: Thomas Abraham <[email protected]>
Remove the custom low-level initialization function and reuse the default low-level initialization function. But this requires the ARMV8_MULTIENTRY config option to be enabled for Exynos7420.
On Exynos7420, the boot CPU belongs to the second cluster and so with ARMV8_MULTIENTRY config option enabled, the 'branch_if_master' macro fails to detect the CPU as boot CPU. As a temporary workaround the CPU_RELEASE_ADDR is set to point to '_main'.
--- arch/arm/mach-exynos/Kconfig | 1 + arch/arm/mach-exynos/soc.c | 18 ++++++++++-------- include/configs/exynos7420-common.h | 1 + 3 files changed, 12 insertions(+), 8 deletions(-)
arch/arm/mach-exynos/Kconfig +1 -0
@@ -126,6 +126,7 @@ choice config TARGET_ESPRESSO7420 bool "ESPRESSO7420 board" select ARM64 + select ARMV8_MULTIENTRY select SUPPORT_SPL select OF_CONTROL select SPL_DISABLE_OF_CONTROL
arch/arm/mach-exynos/soc.c +10 -8
@@ -9,6 +9,16 @@#include <asm/io.h> #include <asm/system.h> +#ifdef CONFIG_TARGET_ESPRESSO7420 +/* +* Exynos7420 uses CPU0 of Cluster-1 as boot CPU. Due to this, branch_if_master +* fails to identify as the boot CPU as the master CPU. As temporary workaround, +* setup the slave CPU boot address as "_main". +*/ +extern void _main (void ); +void *secondary_boot_addr = (void *)_main; +#endif /* CONFIG_TARGET_ESPRESSO7420 */ +void reset_cpu (ulong addr) {#ifdef CONFIG_CPU_V7
@@ -23,11 +33,3 @@ void enable_caches(void) dcache_enable(); }#endif - -#ifdef CONFIG_ARM64 -void lowlevel_init (void ) -{ -armv8_switch_to_el2 (); -armv8_switch_to_el1 (); -} -#endif
include/configs/exynos7420-common.h +1 -0
@@ -47,6 +47,7 @@#define CONFIG_IRAM_BASE 0x02100000#define CONFIG_IRAM_SIZE 0x58000#define CONFIG_IRAM_END (CONFIG_IRAM_BASE + CONFIG_IRAM_SIZE) +#define CPU_RELEASE_ADDR secondary_boot_addr/* Number of CPUs available */ #define CONFIG_CORE_COUNT 0x8
Signature · 1 line
1.6.6.rc2
PATCH 1/1 arm: exynos7420: remove custome low level init function
Quoted 81 lines
From: Thomas Abraham <[email protected]>
Remove the custom low-level initialization function and reuse the default low-level initialization function. But this requires the
ARMV8_MULTIENTRYconfig option to be enabled for Exynos7420.On Exynos7420, the boot CPU belongs to the second cluster and so with
ARMV8_MULTIENTRYconfig option enabled, the 'branch_if_master' macro fails to detect the CPU as boot CPU. As a temporary workaround theCPU_RELEASE_ADDRis set to point to '_main'.Cc Minkyu Kang <[email protected]>Cc Alison Wang <[email protected]>Signed-off-by Thomas Abraham <[email protected]>--- arch/arm/mach-exynos/Kconfig | 1 + arch/arm/mach-exynos/soc.c | 18 ++++++++++-------- include/configs/exynos7420-common.h | 1 + 3 files changed, 12 insertions(+), 8 deletions(-)arch/arm/mach- renamed from arch/arm/mach-exynos/Kconfig +0
-0exynos/Kconfig
index ce2a16f..07118fc 100644arch/arm/mach-exynos/Kconfig +1
-0@@ -126,6 +126,7 @@ choice config TARGET_ESPRESSO7420 bool "ESPRESSO7420 board" select ARM64 + select ARMV8_MULTIENTRY select SUPPORT_SPL select OF_CONTROL select SPL_DISABLE_OF_CONTROLarch/arm/mach-exynos/soc.c +3
-0@@ -9,6 +9,16 @@#include <asm/io.h> #include <asm/system.h> +#ifdef CONFIG_TARGET_ESPRESSO7420 +/* +* Exynos7420 uses CPU0 of Cluster-1 as boot CPU. Due to this,
branch_if_master
+ * fails to identify as the boot CPU as the master CPU. As temporary workaround,
+ * setup the slave CPU boot address as "_main".
+ */arch/arm/mach-exynos/soc.c +4
-8+extern void _main (void ); +void *secondary_boot_addr = (void *)_main; +#endif /* CONFIG_TARGET_ESPRESSO7420 */ +void reset_cpu (ulong addr) {#ifdef CONFIG_CPU_V7 @@ -23,11 +33,3 @@ void enable_caches(void) dcache_enable(); }#endif - -#ifdef CONFIG_ARM64 -void lowlevel_init (void ) -{ -armv8_switch_to_el2 (); -armv8_switch_to_el1 (); -} -#endif include/configs/exynos7420-common.h +1
-0@@ -47,6 +47,7 @@#define CONFIG_IRAM_BASE 0x02100000#define CONFIG_IRAM_SIZE 0x58000#define CONFIG_IRAM_END (CONFIG_IRAM_BASE + CONFIG_IRAM_SIZE) +#define CPU_RELEASE_ADDR secondary_boot_addr/* Number of CPUs available */
Quoted 2 lines
#define
CONFIG_CORE_COUNT0x8
Thanks.
Best Regards,
Alison Wang
PATCH 1/1 arm: exynos7420: remove custome low level init function
Quoted 5 lines · Alison Wang
Quoted 2 lines
From: Thomas Abraham <[email protected]>
Reviewed-by Alison Wang <[email protected]>
I will merge this patch.
York
york sun
AppliedPATCH 1/1 arm: exynos7420: remove custome low level init function
In reply to Alison WangQuoted 11 lines · Alison Wang
Quoted 11 lines
From: Thomas Abraham <[email protected]>
Remove the custom low-level initialization function and reuse the default low-level initialization function. But this requires the
ARMV8_MULTIENTRYconfig option to be enabled for Exynos7420.On Exynos7420, the boot CPU belongs to the second cluster and so with
ARMV8_MULTIENTRYconfig option enabled, the 'branch_if_master' macro fails to detect the CPU as boot CPU. As a temporary workaround theCPU_RELEASE_ADDRis set to point to '_main'.
Quoted 4 lines
Quoted 4 lines
Cc Minkyu Kang <[email protected]>Cc Alison Wang <[email protected]>Signed-off-by Thomas Abraham <[email protected]>---
Applied to fsl-qoriq, awaiting upstream. Thanks.
York