From patchwork Mon Jun 17 16:34:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 2737201 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 516F0C0AB1 for ; Mon, 17 Jun 2013 19:15:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4583F2045C for ; Mon, 17 Jun 2013 19:15:18 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DC4BB2042B for ; Mon, 17 Jun 2013 19:15:16 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UocVE-0003Pl-N5; Mon, 17 Jun 2013 16:42:02 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UocTS-0006XS-HV; Mon, 17 Jun 2013 16:40:10 +0000 Received: from mailout1.w1.samsung.com ([210.118.77.11]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UocPS-000632-2I for linux-arm-kernel@lists.infradead.org; Mon, 17 Jun 2013 16:36:06 +0000 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MOJ0085OQ1L6450@mailout1.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 17 Jun 2013 17:34:58 +0100 (BST) X-AuditID: cbfec7f4-b7fd76d0000035e1-c5-51bf3ab22c2e Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 6B.85.13793.2BA3FB15; Mon, 17 Jun 2013 17:34:58 +0100 (BST) Received: from amdc1227.digital.local ([106.116.147.199]) by eusync3.samsung.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0MOJ002RHQ1OMHC0@eusync3.samsung.com>; Mon, 17 Jun 2013 17:34:58 +0100 (BST) From: Tomasz Figa To: linux-samsung-soc@vger.kernel.org Subject: [PATCH v2 37/38] ARM: EXYNOS: Remove legacy L2X0 initialization Date: Mon, 17 Jun 2013 18:34:22 +0200 Message-id: <1371486863-12398-38-git-send-email-t.figa@samsung.com> X-Mailer: git-send-email 1.8.2.1 In-reply-to: <1371486863-12398-1-git-send-email-t.figa@samsung.com> References: <1371486863-12398-1-git-send-email-t.figa@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupkluLIzCtJLcpLzFFi42I5/e/4Vd1NVvsDDVbvUbX4O+kYu0Xvgqts Fmeb3rBbbHp8jdVixvl9TBZrj9xltzh1/TObxeE37awW62e8ZrE4NmMJowOXx+9fkxg97lzb w+axeUm9x5UTTawefVtWMXp83iQXwBbFZZOSmpNZllqkb5fAldH48A5rwXPhimOvprA1MN4R 6GLk5JAQMJFYvPEYE4QtJnHh3no2EFtIYCmjxMevaV2MXEB2H5PE/s9zWUESbAJqEp8bHoEV iQioSnxuW8AOUsQs8JJJ4m7jA3aQhLCAh8Tvvu1gDSxARfs7uhlBbF4BZ4mFNyawQGxTkDi+ fRtYnBMovrjvFjPEZieJ3TMvsU5g5F3AyLCKUTS1NLmgOCk911CvODG3uDQvXS85P3cTIyT4 vuxgXHzM6hCjAAejEg9vgtj+QCHWxLLiytxDjBIczEoivLET9wUK8aYkVlalFuXHF5XmpBYf YmTi4JRqYJx05noPx31bw2nPspNSj4Y/NAu6q6d5hyH+p9XNVbbrWTZkaE9w2zXBN33HmwXr 9z12efrhW8ndwIPu5+8br5ZLXhR6WSO8d8vlb9VlAskZnA9mbhTdq+EvFfCWX8fw0+Kn787b BzQq3vOzlyuuvn36xqw+iXPPZxxfPiPcoGKB7a2X/p8dyj4rsRRnJBpqMRcVJwIArp3BChwC AAA= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130617_123602_252941_137DE580 X-CRM114-Status: GOOD ( 10.34 ) X-Spam-Score: -8.0 (--------) Cc: Kukjin Kim , Arnd Bergmann , Tomasz Figa , Kyungmin Park , Thomas Abraham , Sylwester Nawrocki , Olof Johansson , linux-arm-kernel@lists.infradead.org, Marek Szyprowski 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=-5.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 Since Exynos is now supporting only DT-based boot, the old L2X0 initialization code is not needed anymore, so exynos4_l2x0_cache_init() can be greatly simplified. Signed-off-by: Arnd Bergmann Signed-off-by: Tomasz Figa Signed-off-by: Kyungmin Park --- arch/arm/mach-exynos/common.c | 48 ++++--------------------------------------- 1 file changed, 4 insertions(+), 44 deletions(-) diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index 561890f..e886154 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c @@ -412,59 +412,19 @@ static int __init exynos_core_init(void) } core_initcall(exynos_core_init); -#ifdef CONFIG_CACHE_L2X0 static int __init exynos4_l2x0_cache_init(void) { int ret; - if (soc_is_exynos5250() || soc_is_exynos5440()) - return 0; - ret = l2x0_of_init(L2_AUX_VAL, L2_AUX_MASK); - if (!ret) { - l2x0_regs_phys = virt_to_phys(&l2x0_saved_regs); - clean_dcache_area(&l2x0_regs_phys, sizeof(unsigned long)); - return 0; - } - - if (!(__raw_readl(S5P_VA_L2CC + L2X0_CTRL) & 0x1)) { - l2x0_saved_regs.phy_base = EXYNOS4_PA_L2CC; - /* TAG, Data Latency Control: 2 cycles */ - l2x0_saved_regs.tag_latency = 0x110; - - if (soc_is_exynos4212() || soc_is_exynos4412()) - l2x0_saved_regs.data_latency = 0x120; - else - l2x0_saved_regs.data_latency = 0x110; - - l2x0_saved_regs.prefetch_ctrl = 0x30000007; - l2x0_saved_regs.pwr_ctrl = - (L2X0_DYNAMIC_CLK_GATING_EN | L2X0_STNDBY_MODE_EN); - - l2x0_regs_phys = virt_to_phys(&l2x0_saved_regs); - - __raw_writel(l2x0_saved_regs.tag_latency, - S5P_VA_L2CC + L2X0_TAG_LATENCY_CTRL); - __raw_writel(l2x0_saved_regs.data_latency, - S5P_VA_L2CC + L2X0_DATA_LATENCY_CTRL); - - /* L2X0 Prefetch Control */ - __raw_writel(l2x0_saved_regs.prefetch_ctrl, - S5P_VA_L2CC + L2X0_PREFETCH_CTRL); - - /* L2X0 Power Control */ - __raw_writel(l2x0_saved_regs.pwr_ctrl, - S5P_VA_L2CC + L2X0_POWER_CTRL); - - clean_dcache_area(&l2x0_regs_phys, sizeof(unsigned long)); - clean_dcache_area(&l2x0_saved_regs, sizeof(struct l2x0_regs)); - } + if (ret) + return ret; - l2x0_init(S5P_VA_L2CC, L2_AUX_VAL, L2_AUX_MASK); + l2x0_regs_phys = virt_to_phys(&l2x0_saved_regs); + clean_dcache_area(&l2x0_regs_phys, sizeof(unsigned long)); return 0; } early_initcall(exynos4_l2x0_cache_init); -#endif static int __init exynos_init(void) {