From f4b9f40ae95bad3df68d4a9b275714ef04abb1b5 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Wed, 22 Jun 2016 01:59:39 -0700 Subject: ARM: OMAP4+: Initialize SAR RAM base early for proper CPU1 reset for kexec Prepare things for making kexec work on SMP omap variants by initializing SARM RAM base early. This allows us to configure CPU1 for kexec in case the previous kernel has put CPU1 in low power mode. Note that this should not prevent moving other SAR RAM code to live under drivers. However for kexec, we will need this very early. Acked-by: Santosh Shilimkar Tested-by: Keerthy Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/io.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/arm/mach-omap2/io.c') diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 49de4dd227be..4548cb9f673e 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c @@ -690,6 +690,7 @@ void __init omap4430_init_early(void) omap4xxx_check_revision(); omap4xxx_check_features(); omap2_prcm_base_init(); + omap4_sar_ram_init(); omap4_pm_init_early(); omap44xx_voltagedomains_init(); omap44xx_powerdomains_init(); @@ -718,6 +719,7 @@ void __init omap5_init_early(void) omap4_pm_init_early(); omap2_prcm_base_init(); omap5xxx_check_revision(); + omap4_sar_ram_init(); omap54xx_voltagedomains_init(); omap54xx_powerdomains_init(); omap54xx_clockdomains_init(); -- cgit v1.2.3 From 0573b957fc21c6a6cee01fdb08c1f7ce556afbac Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Wed, 22 Jun 2016 01:59:39 -0700 Subject: ARM: OMAP4+: Prevent CPU1 related hang with kexec Kexec booted kernels on omap4 will hang early during the boot if the booted kernel is different version from the previous kernel. This is because the previous kernel may have configured low-power mode using CPU1_WAKEUP_NS_PA_ADDR. In that case it points to the previous kernel's omap4_secondary_startup(), and CPU1 can be in low power mode from the previous kernel. When the new kernel configures the CPU1 clockdomain, CPU1 can wake from low power state prematurely during omap44xx_clockdomains_init() running random code. Let's fix the issue by configuring CPU1_WAKEUP_NS_PA_ADDR before we call omap44xx_clockdomains_init(). Note that this is very early during the init, and we will do proper CPU1 reset during SMP init a bit later on in omap4_smp_prepare_cpus(). And we need to do this when SMP is not enabled as the previous kernel may have had it enabled. Acked-by: Santosh Shilimkar Tested-by: Keerthy Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/io.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/mach-omap2/io.c') diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 4548cb9f673e..0e9acdd95d70 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c @@ -691,6 +691,7 @@ void __init omap4430_init_early(void) omap4xxx_check_features(); omap2_prcm_base_init(); omap4_sar_ram_init(); + omap4_mpuss_early_init(); omap4_pm_init_early(); omap44xx_voltagedomains_init(); omap44xx_powerdomains_init(); -- cgit v1.2.3