summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/headsmp.S
diff options
context:
space:
mode:
authorAnson Huang <b20788@freescale.com>2021-05-25 21:14:16 -0300
committerShawn Guo <shawnguo@kernel.org>2021-06-12 12:02:57 +0800
commite34645f45805d8308866de7b69f117f554605bb6 (patch)
tree728088350539c203ab9e19c38de9feac943cacc5 /arch/arm/mach-imx/headsmp.S
parentcc8870bf4c3ab0af385538460500a9d342ed945f (diff)
downloadlinux-stable-e34645f45805d8308866de7b69f117f554605bb6.tar.gz
linux-stable-e34645f45805d8308866de7b69f117f554605bb6.tar.bz2
linux-stable-e34645f45805d8308866de7b69f117f554605bb6.zip
ARM: imx: add smp support for imx7d
Add SMP support for i.MX7D, including CPU hotplug support, for systems where TFA is not present. The motivation for bringing up the second i.MX7D core inside the kernel is that legacy vendor bootloaders usually do not implement PSCI support. This is a significant blocker for systems in the field that are running old bootloader versions to upgrade to a modern mainline kernel version, as only one CPU of the i.MX7D would be brought up. Bring up the second i.MX7D core inside the kernel to make the migration path to mainline kernel easier for the existing iMX7D users. Signed-off-by: Anson Huang <b20788@freescale.com> Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com> # Fix merge conflicts Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> Signed-off-by: Marek Vasut <marex@denx.de> # heavy cleanup Signed-off-by: Fabio Estevam <festevam@denx.de> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Diffstat (limited to 'arch/arm/mach-imx/headsmp.S')
-rw-r--r--arch/arm/mach-imx/headsmp.S9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/headsmp.S b/arch/arm/mach-imx/headsmp.S
index 766dbdb2ae27..fcba58be8e79 100644
--- a/arch/arm/mach-imx/headsmp.S
+++ b/arch/arm/mach-imx/headsmp.S
@@ -21,6 +21,15 @@ diag_reg_offset:
ENTRY(v7_secondary_startup)
ARM_BE8(setend be) @ go BE8 if entered LE
+ mrc p15, 0, r0, c0, c0, 0
+ lsl r0, r0, #16
+ lsr r0, r0, #20
+ /* 0xc07 is cortex A7's ID */
+ mov r1, #0xc00
+ orr r1, #0x7
+ cmp r0, r1
+ beq secondary_startup
+
set_diag_reg
b secondary_startup
ENDPROC(v7_secondary_startup)