From patchwork Thu Sep 13 08:13:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 1450821 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (unknown [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id D2C36DF24C for ; Thu, 13 Sep 2012 08:27:46 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TC4Z3-0005Ga-Ff; Thu, 13 Sep 2012 08:14:21 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TC4Yr-0005Ev-9Z for linux-arm-kernel@lists.infradead.org; Thu, 13 Sep 2012 08:14:10 +0000 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MAA00L2C46GO2V0@mailout2.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 13 Sep 2012 17:14:05 +0900 (KST) X-AuditID: cbfee61a-b7fba6d000007d5f-d8-505195cd82cf Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 37.81.32095.DC591505; Thu, 13 Sep 2012 17:14:05 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MAA00F0A477MEF1@mmp1.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 13 Sep 2012 17:14:05 +0900 (KST) From: Tomasz Figa To: linux-samsung-soc@vger.kernel.org Subject: [PATCH 1/5] ARM: EXYNOS: Add IO mapping for non-secure SYSRAM. Date: Thu, 13 Sep 2012 10:13:34 +0200 Message-id: <1347524018-19301-2-git-send-email-t.figa@samsung.com> X-Mailer: git-send-email 1.7.10 In-reply-to: <1347524018-19301-1-git-send-email-t.figa@samsung.com> References: <1347524018-19301-1-git-send-email-t.figa@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMJMWRmVeSWpSXmKPExsVy+t9jAd2zUwMDDKack7PY9PgaqwOjx+Yl 9QGMUVw2Kak5mWWpRfp2CVwZv5p2shTsl6hY9eYuWwPjY5EuRk4OCQETidMz7zNC2GISF+6t Z+ti5OIQEljEKPHrzURmCGczk8Tn1Q/ZQarYBNQkPjc8YgOxRQRUJT63LWAHKWIWWMkosfHd PLCEsIC7xJ3l65hAbBagogUfd7CC2LwCThL7eicwQayTl3h6vw+snlPAWeLDgy1gZwgB1Ww5 /IxlAiPvAkaGVYyiqQXJBcVJ6bmGesWJucWleel6yfm5mxjBXn8mtYNxZYPFIUYBDkYlHt7M 5wEBQqyJZcWVuYcYJTiYlUR41bsDA4R4UxIrq1KL8uOLSnNSiw8xSnOwKInzOp2zCxASSE8s Sc1OTS1ILYLJMnFwSjUwTtoi4B/+bvcLt4TFGcwzGzyPTP60/9+b6U3Ljm7wPt7OXHF75vOj Lq/Y2b+kO9gLH9PY/lj7aKiw7esI78hLcW4dNl7Fr/pO7I/bqnNNX2767XcBEUVbXPpCbCaX 2S+6VSqQJv8gqc9iQfh7Lr2m2tZJL8KVfNe01JbV/K2/8WPJ5O2hwrOnK7EUZyQaajEXFScC ALGoC+v2AQAA X-Spam-Note: CRM114 invocation failed X-Spam-Score: -7.3 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.25 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.4 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: kgene.kim@samsung.com, linux@arm.linux.org.uk, arnd@arndb.de, t.figa@samsung.com, kyungmin.park@samsung.com, olof@lixom.net, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org On TrustZone-enabled boards the non-secure SYSRAM is used for secondary CPU bring-up, so add a mapping for it. Signed-off-by: Tomasz Figa --- arch/arm/mach-exynos/common.c | 34 ++++++++++++++++++++++++++++ arch/arm/mach-exynos/include/mach/map.h | 3 +++ arch/arm/plat-samsung/include/plat/map-s5p.h | 1 + 3 files changed, 38 insertions(+) diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index 715b690..b87feac 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c @@ -214,6 +214,33 @@ static struct map_desc exynos4_iodesc1[] __initdata = { }, }; +static struct map_desc exynos4210_iodesc[] __initdata = { + { + .virtual = (unsigned long)S5P_VA_SYSRAM_NS, + .pfn = __phys_to_pfn(EXYNOS4210_PA_SYSRAM_NS), + .length = SZ_4K, + .type = MT_DEVICE, + }, +}; + +static struct map_desc exynos4x12_iodesc[] __initdata = { + { + .virtual = (unsigned long)S5P_VA_SYSRAM_NS, + .pfn = __phys_to_pfn(EXYNOS4x12_PA_SYSRAM_NS), + .length = SZ_4K, + .type = MT_DEVICE, + }, +}; + +static struct map_desc exynos5250_iodesc[] __initdata = { + { + .virtual = (unsigned long)S5P_VA_SYSRAM_NS, + .pfn = __phys_to_pfn(EXYNOS5250_PA_SYSRAM_NS), + .length = SZ_4K, + .type = MT_DEVICE, + }, +}; + static struct map_desc exynos5_iodesc[] __initdata = { { .virtual = (unsigned long)S3C_VA_SYS, @@ -321,6 +348,13 @@ static void __init exynos4_map_io(void) else iotable_init(exynos4_iodesc1, ARRAY_SIZE(exynos4_iodesc1)); + if (soc_is_exynos4210()) + iotable_init(exynos4210_iodesc, ARRAY_SIZE(exynos4210_iodesc)); + if (soc_is_exynos4212() || soc_is_exynos4412()) + iotable_init(exynos4x12_iodesc, ARRAY_SIZE(exynos4x12_iodesc)); + if (soc_is_exynos5250()) + iotable_init(exynos5250_iodesc, ARRAY_SIZE(exynos5250_iodesc)); + /* initialize device information early */ exynos4_default_sdhci0(); exynos4_default_sdhci1(); diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h index 51943f2..869d8a0 100644 --- a/arch/arm/mach-exynos/include/mach/map.h +++ b/arch/arm/mach-exynos/include/mach/map.h @@ -26,6 +26,9 @@ #define EXYNOS4_PA_SYSRAM0 0x02025000 #define EXYNOS4_PA_SYSRAM1 0x02020000 #define EXYNOS5_PA_SYSRAM 0x02020000 +#define EXYNOS4210_PA_SYSRAM_NS 0x0203F000 +#define EXYNOS4x12_PA_SYSRAM_NS 0x0204F000 +#define EXYNOS5250_PA_SYSRAM_NS 0x0204F000 #define EXYNOS4_PA_FIMC0 0x11800000 #define EXYNOS4_PA_FIMC1 0x11810000 diff --git a/arch/arm/plat-samsung/include/plat/map-s5p.h b/arch/arm/plat-samsung/include/plat/map-s5p.h index c2d7bda..c186786 100644 --- a/arch/arm/plat-samsung/include/plat/map-s5p.h +++ b/arch/arm/plat-samsung/include/plat/map-s5p.h @@ -22,6 +22,7 @@ #define S5P_VA_GPIO3 S3C_ADDR(0x02280000) #define S5P_VA_SYSRAM S3C_ADDR(0x02400000) +#define S5P_VA_SYSRAM_NS S3C_ADDR(0x02410000) #define S5P_VA_DMC0 S3C_ADDR(0x02440000) #define S5P_VA_DMC1 S3C_ADDR(0x02480000) #define S5P_VA_SROMC S3C_ADDR(0x024C0000)