aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-09-22 02:00:41 -0400
committerOlof Johansson <olof@lixom.net>2012-09-22 02:00:41 -0400
commit8437de04d1475ee4af43a217ac2ca74eb9f58ad1 (patch)
treeb8481a64ea0bcb0a6b2f8d27f0c26e39726f0a03 /arch/arm/plat-omap
parent3aec092eed5d8d2b19a62b0aeed3acea9471099a (diff)
parent13acc291191281e2980e56dbe3a3d80ce677c9a8 (diff)
Merge branch 'next/devel-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/soc
Misc SoC-related fixes/cleanups for Samsung platforms * 'next/devel-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: ARM: SAMSUNG: Add check for NULL in clock interface ARM: EXYNOS: Put PCM, Slimbus, Spdif clocks to off state ARM: EXYNOS: Add bus clock for FIMD ARM: SAMSUNG: Fix HDMI related warnings ARM: S3C24XX: Add .get_rate callback for "camif-upll" clock ARM: EXYNOS: Fix incorrect help text ARM: EXYNOS: Turn off clocks for NAND, OneNAND and TSI controllers + sync to 3.6-rc6
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r--arch/arm/plat-omap/sram.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
index d861aa73299d..28acb383e7df 100644
--- a/arch/arm/plat-omap/sram.c
+++ b/arch/arm/plat-omap/sram.c
@@ -67,6 +67,7 @@
67 67
68static unsigned long omap_sram_start; 68static unsigned long omap_sram_start;
69static void __iomem *omap_sram_base; 69static void __iomem *omap_sram_base;
70static unsigned long omap_sram_skip;
70static unsigned long omap_sram_size; 71static unsigned long omap_sram_size;
71static void __iomem *omap_sram_ceil; 72static void __iomem *omap_sram_ceil;
72 73
@@ -105,6 +106,7 @@ static int is_sram_locked(void)
105 */ 106 */
106static void __init omap_detect_sram(void) 107static void __init omap_detect_sram(void)
107{ 108{
109 omap_sram_skip = SRAM_BOOTLOADER_SZ;
108 if (cpu_class_is_omap2()) { 110 if (cpu_class_is_omap2()) {
109 if (is_sram_locked()) { 111 if (is_sram_locked()) {
110 if (cpu_is_omap34xx()) { 112 if (cpu_is_omap34xx()) {
@@ -112,6 +114,7 @@ static void __init omap_detect_sram(void)
112 if ((omap_type() == OMAP2_DEVICE_TYPE_EMU) || 114 if ((omap_type() == OMAP2_DEVICE_TYPE_EMU) ||
113 (omap_type() == OMAP2_DEVICE_TYPE_SEC)) { 115 (omap_type() == OMAP2_DEVICE_TYPE_SEC)) {
114 omap_sram_size = 0x7000; /* 28K */ 116 omap_sram_size = 0x7000; /* 28K */
117 omap_sram_skip += SZ_16K;
115 } else { 118 } else {
116 omap_sram_size = 0x8000; /* 32K */ 119 omap_sram_size = 0x8000; /* 32K */
117 } 120 }
@@ -174,8 +177,10 @@ static void __init omap_map_sram(void)
174 return; 177 return;
175 178
176#ifdef CONFIG_OMAP4_ERRATA_I688 179#ifdef CONFIG_OMAP4_ERRATA_I688
180 if (cpu_is_omap44xx()) {
177 omap_sram_start += PAGE_SIZE; 181 omap_sram_start += PAGE_SIZE;
178 omap_sram_size -= SZ_16K; 182 omap_sram_size -= SZ_16K;
183 }
179#endif 184#endif
180 if (cpu_is_omap34xx()) { 185 if (cpu_is_omap34xx()) {
181 /* 186 /*
@@ -202,8 +207,8 @@ static void __init omap_map_sram(void)
202 * Looks like we need to preserve some bootloader code at the 207 * Looks like we need to preserve some bootloader code at the
203 * beginning of SRAM for jumping to flash for reboot to work... 208 * beginning of SRAM for jumping to flash for reboot to work...
204 */ 209 */
205 memset_io(omap_sram_base + SRAM_BOOTLOADER_SZ, 0, 210 memset_io(omap_sram_base + omap_sram_skip, 0,
206 omap_sram_size - SRAM_BOOTLOADER_SZ); 211 omap_sram_size - omap_sram_skip);
207} 212}
208 213
209/* 214/*
@@ -217,7 +222,7 @@ void *omap_sram_push_address(unsigned long size)
217{ 222{
218 unsigned long available, new_ceil = (unsigned long)omap_sram_ceil; 223 unsigned long available, new_ceil = (unsigned long)omap_sram_ceil;
219 224
220 available = omap_sram_ceil - (omap_sram_base + SRAM_BOOTLOADER_SZ); 225 available = omap_sram_ceil - (omap_sram_base + omap_sram_skip);
221 226
222 if (size > available) { 227 if (size > available) {
223 pr_err("Not enough space in SRAM\n"); 228 pr_err("Not enough space in SRAM\n");