diff options
author | Santosh Shilimkar <santosh.shilimkar@ti.com> | 2011-01-01 09:26:04 -0500 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2011-12-08 14:28:59 -0500 |
commit | 501f0c751de06d8484b4279131c26f58bd49a69d (patch) | |
tree | b993d2a9ad7df11dbde65e41ee0dc8d4e444113b /arch/arm/mach-omap2/omap4-common.c | |
parent | 02afe8a7f23d562cec76743ae34c4735d2819345 (diff) |
ARM: OMAP4: PM: Add SAR RAM support
This patch adds SAR RAM support on OMAP4430. SAR RAM used to save
and restore the HW context in low power modes.
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Jean Pihet <j-pihet@ti.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Tested-by: Vishwanath BS <vishwanath.bs@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap4-common.c')
-rw-r--r-- | arch/arm/mach-omap2/omap4-common.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index 4a3d2898543b..2489f5b8b983 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c | |||
@@ -24,11 +24,14 @@ | |||
24 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
25 | 25 | ||
26 | #include "common.h" | 26 | #include "common.h" |
27 | #include "omap4-sar-layout.h" | ||
27 | 28 | ||
28 | #ifdef CONFIG_CACHE_L2X0 | 29 | #ifdef CONFIG_CACHE_L2X0 |
29 | static void __iomem *l2cache_base; | 30 | static void __iomem *l2cache_base; |
30 | #endif | 31 | #endif |
31 | 32 | ||
33 | static void __iomem *sar_ram_base; | ||
34 | |||
32 | void __init gic_init_irq(void) | 35 | void __init gic_init_irq(void) |
33 | { | 36 | { |
34 | void __iomem *omap_irq_base; | 37 | void __iomem *omap_irq_base; |
@@ -118,3 +121,30 @@ static int __init omap_l2_cache_init(void) | |||
118 | } | 121 | } |
119 | early_initcall(omap_l2_cache_init); | 122 | early_initcall(omap_l2_cache_init); |
120 | #endif | 123 | #endif |
124 | |||
125 | void __iomem *omap4_get_sar_ram_base(void) | ||
126 | { | ||
127 | return sar_ram_base; | ||
128 | } | ||
129 | |||
130 | /* | ||
131 | * SAR RAM used to save and restore the HW | ||
132 | * context in low power modes | ||
133 | */ | ||
134 | static int __init omap4_sar_ram_init(void) | ||
135 | { | ||
136 | /* | ||
137 | * To avoid code running on other OMAPs in | ||
138 | * multi-omap builds | ||
139 | */ | ||
140 | if (!cpu_is_omap44xx()) | ||
141 | return -ENOMEM; | ||
142 | |||
143 | /* Static mapping, never released */ | ||
144 | sar_ram_base = ioremap(OMAP44XX_SAR_RAM_BASE, SZ_16K); | ||
145 | if (WARN_ON(!sar_ram_base)) | ||
146 | return -ENOMEM; | ||
147 | |||
148 | return 0; | ||
149 | } | ||
150 | early_initcall(omap4_sar_ram_init); | ||