From patchwork Sat Jul 10 07:08:33 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vikram pandita X-Patchwork-Id: 111209 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6A77WHN008251 for ; Sat, 10 Jul 2010 07:07:32 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751840Ab0GJHHS (ORCPT ); Sat, 10 Jul 2010 03:07:18 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:33406 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751655Ab0GJHHL (ORCPT ); Sat, 10 Jul 2010 03:07:11 -0400 Received: from dlep36.itg.ti.com ([157.170.170.91]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id o6A77Atj018644 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 10 Jul 2010 02:07:10 -0500 Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep36.itg.ti.com (8.13.8/8.13.8) with ESMTP id o6A778Mo005586; Sat, 10 Jul 2010 02:07:08 -0500 (CDT) Received: from vip-tid (lta0307903-128247075087.am.dhcp.ti.com [128.247.75.87]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id o6A778P14563; Sat, 10 Jul 2010 02:07:08 -0500 (CDT) Received: from vip-tid (localhost.localdomain [127.0.0.1]) by vip-tid (Postfix) with ESMTP id 6BC8229C826; Sat, 10 Jul 2010 02:08:35 -0500 (CDT) Received: (from vikram@localhost) by vip-tid (8.14.3/8.14.3/Submit) id o6A78Zu7031300; Sat, 10 Jul 2010 02:08:35 -0500 X-Authentication-Warning: vip-tid: vikram set sender to vikram.pandita@ti.com using -f From: Vikram Pandita To: linux-omap@vger.kernel.org Cc: Vikram Pandita Subject: [PATCH 3/3] omap4: SRAM start and size change for EMU/HS devices Date: Sat, 10 Jul 2010 02:08:33 -0500 Message-Id: <1278745713-31255-4-git-send-email-vikram.pandita@ti.com> X-Mailer: git-send-email 1.6.6.1 In-Reply-To: <1278745713-31255-3-git-send-email-vikram.pandita@ti.com> References: <1278745713-31255-1-git-send-email-vikram.pandita@ti.com> <1278745713-31255-2-git-send-email-vikram.pandita@ti.com> <1278745713-31255-3-git-send-email-vikram.pandita@ti.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sat, 10 Jul 2010 07:07:32 +0000 (UTC) On OMAP4 the SRAM configuration is: GP Device: Start Address: 0x4030 0000 Size: 0xE000 (56KB) EMU/HS Device: Start Address: 0x4030 4000 Size: 0xA000 (40KB) Implement this mapping in the sram file Signed-off-by: Vikram Pandita --- arch/arm/plat-omap/sram.c | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c index 112b807..3c7c9a6 100644 --- a/arch/arm/plat-omap/sram.c +++ b/arch/arm/plat-omap/sram.c @@ -53,7 +53,7 @@ #define OMAP4_SRAM_PUB_PA (OMAP4_SRAM_PA + 0x4000) #define OMAP4_SRAM_PUB_VA (OMAP4_SRAM_VA + 0x4000) -#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) +#if defined(CONFIG_ARCH_OMAP2PLUS) #define SRAM_BOOTLOADER_SZ 0x00 #else #define SRAM_BOOTLOADER_SZ 0x80 @@ -134,9 +134,18 @@ void __init omap_detect_sram(void) omap_sram_size = 0x8000; /* 32K */ } } else if (cpu_is_omap44xx()) { - omap_sram_base = OMAP4_SRAM_PUB_VA; - omap_sram_start = OMAP4_SRAM_PUB_PA; - omap_sram_size = 0xa000; /* 40K */ + if ((omap_type() == OMAP2_DEVICE_TYPE_EMU) || + (omap_type() == OMAP2_DEVICE_TYPE_SEC)) { + /* 40K For Public SRAM */ + omap_sram_base = OMAP4_SRAM_PUB_VA; + omap_sram_start = OMAP4_SRAM_PUB_PA; + omap_sram_size = 0xA000; + } else { + /* 56 KB SRAM on GP device */ + omap_sram_base = OMAP4_SRAM_VA; + omap_sram_start = OMAP4_SRAM_PA; + omap_sram_size = 0xE000; + } } else { omap_sram_base = OMAP2_SRAM_PUB_VA; omap_sram_start = OMAP2_SRAM_PUB_PA;