diff options
author | Tony Lindgren <tony@atomide.com> | 2016-06-22 10:59:39 +0200 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2016-06-23 07:55:47 +0200 |
commit | f4b9f40ae95bad3df68d4a9b275714ef04abb1b5 (patch) | |
tree | f8340db3802edb41fcbd24b7d2050a24076a5b17 /arch/arm/mach-omap2/omap4-common.c | |
parent | Merge commit 'c0053bd50af5' into omap-for-v4.8/soc (diff) | |
download | linux-f4b9f40ae95bad3df68d4a9b275714ef04abb1b5.tar.xz linux-f4b9f40ae95bad3df68d4a9b275714ef04abb1b5.zip |
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 <ssantosh@kernel.org>
Tested-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap4-common.c')
-rw-r--r-- | arch/arm/mach-omap2/omap4-common.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index fb6fe26a8f8f..cf65ab8bb004 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c @@ -266,10 +266,11 @@ void __iomem *omap4_get_sar_ram_base(void) } /* - * SAR RAM used to save and restore the HW - * context in low power modes + * SAR RAM used to save and restore the HW context in low power modes. + * Note that we need to initialize this very early for kexec. See + * omap4_mpuss_early_init(). */ -static int __init omap4_sar_ram_init(void) +void __init omap4_sar_ram_init(void) { unsigned long sar_base; @@ -282,16 +283,13 @@ static int __init omap4_sar_ram_init(void) else if (soc_is_omap54xx()) sar_base = OMAP54XX_SAR_RAM_BASE; else - return -ENOMEM; + return; /* Static mapping, never released */ sar_ram_base = ioremap(sar_base, SZ_16K); if (WARN_ON(!sar_ram_base)) - return -ENOMEM; - - return 0; + return; } -omap_early_initcall(omap4_sar_ram_init); static const struct of_device_id intc_match[] = { { .compatible = "ti,omap4-wugen-mpu", }, |