From 24133f32843de5e3524c5902ca14409db768d8ed Mon Sep 17 00:00:00 2001 From: Pierre Peiffer Date: Tue, 4 Oct 2011 15:47:02 +0200 Subject: U8500 CM: do not initialize ESRAM to zero The CM driver initializes the whole ESRAM to zero, including the DMA part (at offset 64k-68k) which can be already in use. Let the CM map only the required part (ie exclude the MCDE part) and do not reset the ESRAM to zero at init. ST-Ericsson ID: 361307 ST-Ericsson Linux next: NA ST-Ericsson FOSS-OUT ID: Trivial Signed-off-by: Pierre Peiffer Change-Id: Ie930e7febe7e24b790c2d2b8ffadc4198daabac7 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/32980 Reviewed-by: Pierre PEIFFER Tested-by: Pierre PEIFFER --- drivers/staging/nmf-cm/configuration.h | 10 +++++++--- drivers/staging/nmf-cm/osal-kernel.c | 2 -- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/staging/nmf-cm/configuration.h b/drivers/staging/nmf-cm/configuration.h index 8f1b88bc23f..35072831a13 100644 --- a/drivers/staging/nmf-cm/configuration.h +++ b/drivers/staging/nmf-cm/configuration.h @@ -19,11 +19,15 @@ #include #endif -/** Nomadik embedded Static RAM base address*/ +/* Embedded Static RAM base address */ #define ESRAM_BASE (U8500_ESRAM_BASE + 0x10000) // V1/V2 config: 0-64k: secure; -/** Nomadik embedded ram size for CM (in Kb) */ -#define ESRAM_SIZE 576 +/* + * Embedded ram size for CM (in Kb) + * 5 banks of 128k: skip the first half bank (secure) and the last + * one (used for MCDE/B2R2), but include DMA part (4k after the secure part) + */ +#define ESRAM_SIZE 448 enum { ESRAM_12, ESRAM_34, diff --git a/drivers/staging/nmf-cm/osal-kernel.c b/drivers/staging/nmf-cm/osal-kernel.c index 4ab3552bd75..f792312e940 100644 --- a/drivers/staging/nmf-cm/osal-kernel.c +++ b/drivers/staging/nmf-cm/osal-kernel.c @@ -89,8 +89,6 @@ int remapRegions(void) pr_err("%s: could not remap ESRAM Base\n", __func__); return -ENOMEM; } - memset(osalEnv.esram_base, 0x0, cfgESRAMSize*ONE_KB); - /* Allocate code and data sections for MPC (SVA, SIA) */ for (i=0; i