From patchwork Tue Apr 15 01:59:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanwoo Choi X-Patchwork-Id: 3988471 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5DD999F336 for ; Tue, 15 Apr 2014 02:02:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 132FF20121 for ; Tue, 15 Apr 2014 02:02:55 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 92021200E9 for ; Tue, 15 Apr 2014 02:02:53 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WZsfa-00076X-04; Tue, 15 Apr 2014 02:00:18 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WZsfX-0005oL-26 for linux-arm-kernel@lists.infradead.org; Tue, 15 Apr 2014 02:00:15 +0000 Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N4100GKNUVSAW70@mailout4.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 15 Apr 2014 10:59:52 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.114]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id 44.50.09028.8929C435; Tue, 15 Apr 2014 10:59:52 +0900 (KST) X-AuditID: cbfee68e-b7f566d000002344-52-534c9298b6e9 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 7F.3E.29263.8929C435; Tue, 15 Apr 2014 10:59:52 +0900 (KST) Received: from chan.10.32.193.11 ([10.252.81.195]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N4100LE6UVPW9A0@mmp1.samsung.com>; Tue, 15 Apr 2014 10:59:52 +0900 (KST) From: Chanwoo Choi To: linux-kernel@vger.kernel.org Subject: [PATCHv2 2/8] ARM: EXYNOS: Add IO mapping for non-secure SYSRAM of Exynos3250 Date: Tue, 15 Apr 2014 10:59:46 +0900 Message-id: <1397527192-21988-3-git-send-email-cw00.choi@samsung.com> X-Mailer: git-send-email 1.8.0 In-reply-to: <1397527192-21988-1-git-send-email-cw00.choi@samsung.com> References: <1397527192-21988-1-git-send-email-cw00.choi@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrHIsWRmVeSWpSXmKPExsWyRsSkSHfGJJ9gg7fbpCz+TjrGbjFp3QEm i8v7tS2uf3nOajH/yDlWi88fWtgtehdcZbM42/SG3WLT42usFpd3zWGzmHF+H5PF7cu8Fn/v /GOzOHX9M1Bo8ks2i/UzXrNYHJuxhNFi787JjA5CHmvmrWH0aGnuYfP4/WsSo8ffVS+YPe5c 28PmsXlJvceVE02sHn1bVjF6fN4kF8AZxWWTkpqTWZZapG+XwJUx5f1t1oI1QhWf52U2MB7l 72Lk5JAQMJE4+n4rG4QtJnHh3nowW0hgKaNET78yTM2JzQuZuhi5gOKLGCVmPX3KCuE0MUnc f9TKBFLFJqAlsf/FDbBuEQEFic29z8CKmAXWMktcnNQIlhAWiJCYdmw/C4jNIqAq8enyD1YQ m1fAVWJ9RwsrxDo5iQ97HrGD2JwCbhJ77/9lhjgJqGb/bLAzJARaOSTOvvzBBjFIQOLb5EN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1OJDjMlAV01klhJNzgemnLySeENjEzMjSyNzQwsjY3PS hJXEeQ+0WgcKCaQnlqRmp6YWpBbBbGHi4JRqYDwYv8fhdNSLnlfnPq6oSXy9j+37PKWJny5e 4VmqlTP/+9sEPr3jfSFuEyW2vDoZ4ddWwLZLoH1+5XVJQ+mGowy7fu2zNHr3/+LsOKtYjrz1 Hpqlj83PyT4VNEndXvfpPqv3/0emnxMEekMXROXGK0r0bPoh8dtuXYOz+bWIPJ/Yj32vUrb5 1SmxFGckGmoxFxUnAgCgqiNALwMAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140414_190015_252011_B832D6F5 X-CRM114-Status: GOOD ( 12.14 ) X-Spam-Score: -6.0 (------) Cc: devicetree@vger.kernel.org, kgene.kim@samsung.com, linux@arm.linux.org.uk, arnd@arndb.de, marc.zyngier@arm.com, t.figa@samsung.com, hyunhee.kim@samsung.com, sw0312.kim@samsung.com, yj44.cho@samsung.com, cw00.choi@samsung.com, kyungmin.park@samsung.com, linux-samsung-soc@vger.kernel.org, thomas.abraham@linaro.org, ben-linux@fluff.org, olof@lixom.net, chanho61.park@samsung.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The non-secure SYSRAM is used for secondary CPU bring-up. This patch add IO mapping for non-scure SYSRAM. Signed-off-by: Chanwoo Choi Acked-by: Kyungmin Park --- Arnd Bergmann suggested that need proper driver instead of static memory mapping. As Chanho Park reply[2], Sachin Kamat already posted the DT support patch[1] for memory mapping for SYSRAM. [1] http://www.spinics.net/lists/linux-samsung-soc/msg27647.html [2] https://lkml.org/lkml/2014/4/10/161 So, I'm going to re-implement following patch related to static memory mapping after merged Sachin Kamat patch[1]. ARM: EXYNOS: Add IO mapping for non-secure SYSRAM of Exynos3250 arch/arm/mach-exynos/exynos.c | 12 ++++++++++++ arch/arm/mach-exynos/include/mach/map.h | 1 + 2 files changed, 13 insertions(+) diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index a603dfa..c7c9472 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c @@ -35,6 +35,15 @@ #define L2_AUX_VAL 0x7C470001 #define L2_AUX_MASK 0xC200ffff +static struct map_desc exynos3250_iodesc[] __initdata = { + { + .virtual = (unsigned long)S5P_VA_SYSRAM_NS, + .pfn = __phys_to_pfn(EXYNOS3_PA_SYSRAM_NS), + .length = SZ_4K, + .type = MT_DEVICE, + }, +}; + static struct map_desc exynos4_iodesc[] __initdata = { { .virtual = (unsigned long)S3C_VA_SYS, @@ -275,6 +284,9 @@ static int __init exynos_fdt_map_chipid(unsigned long node, const char *uname, */ static void __init exynos_map_io(void) { + if (soc_is_exynos3250()) + iotable_init(exynos3250_iodesc, ARRAY_SIZE(exynos3250_iodesc)); + if (soc_is_exynos4()) iotable_init(exynos4_iodesc, ARRAY_SIZE(exynos4_iodesc)); diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h index 7b046b5..a53981b 100644 --- a/arch/arm/mach-exynos/include/mach/map.h +++ b/arch/arm/mach-exynos/include/mach/map.h @@ -26,6 +26,7 @@ #define EXYNOS4_PA_SYSRAM0 0x02025000 #define EXYNOS4_PA_SYSRAM1 0x02020000 #define EXYNOS5_PA_SYSRAM 0x02020000 +#define EXYNOS3_PA_SYSRAM_NS 0x0205F000 #define EXYNOS4210_PA_SYSRAM_NS 0x0203F000 #define EXYNOS4x12_PA_SYSRAM_NS 0x0204F000 #define EXYNOS5250_PA_SYSRAM_NS 0x0204F000