From patchwork Fri Oct 1 11:56:09 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh KUMAR X-Patchwork-Id: 66453 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 620A7B70E0 for ; Sat, 2 Oct 2010 03:09:43 +1000 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1P1j5r-0006E2-C1; Fri, 01 Oct 2010 17:08:24 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by bombadil.infradead.org with esmtps (Exim 4.72 #1 (Red Hat Linux)) id 1P1iwu-0004OR-Gn; Fri, 01 Oct 2010 16:59:08 +0000 Received: from eu1sys200aog107.obsmtp.com ([207.126.144.123]) by casper.infradead.org with smtps (Exim 4.72 #1 (Red Hat Linux)) id 1P1eHN-0008Gf-BE; Fri, 01 Oct 2010 11:59:58 +0000 Received: from source ([164.129.1.35]) (using TLSv1) by eu1sys200aob107.postini.com ([207.126.147.11]) with SMTP ID DSNKTKXMzsc12Hnwx6d6ASwjM1AoOTbF6lX/@postini.com; Fri, 01 Oct 2010 11:59:57 UTC Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 1848D97; Fri, 1 Oct 2010 11:57:51 +0000 (GMT) Received: from mail2.dlh.st.com (mail2.dlh.st.com [10.199.8.22]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id BFE5E265D; Fri, 1 Oct 2010 11:57:47 +0000 (GMT) Received: from localhost (dlhl0509.dlh.st.com [10.199.7.86]) by mail2.dlh.st.com (MOS 3.8.7a) with ESMTP id CUF00995 (AUTH viresh.kumar@st.com); Fri, 1 Oct 2010 17:27:47 +0530 (IST) From: Viresh KUMAR To: linux-arm-kernel@lists.infradead.org, rtc-linux@googlegroups.com, a.zummo@towertech.it, dbrownell@users.sourceforge.net, linux-usb@vger.kernel.org, linux-input@vger.kernel.org, dmitry.torokhov@gmail.com, linux-mtd@lists.infradead.org, dwmw2@infradead.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org Subject: [PATCH V2 49/69] ST SPEAr13xx: add L2 cache support Date: Fri, 1 Oct 2010 17:26:09 +0530 Message-Id: X-Mailer: git-send-email 1.7.2.2 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20101001_125957_619940_C0DE30D7 X-CRM114-Status: GOOD ( 10.35 ) X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.3.1 on casper.infradead.org summary: Content analysis details: (-4.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [207.126.144.123 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: pratyush.anand@st.com, Viresh Kumar , vipulkumar.samar@st.com, bhupesh.sharma@st.com, armando.visconti@st.com, vipin.kumar@st.com, Shiraz Hashim , rajeev-dlh.kumar@st.com, deepak.sikri@st.com X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Shiraz Hashim Signed-off-by: shiraz hashim Signed-off-by: Viresh Kumar --- arch/arm/mach-spear13xx/spear13xx.c | 19 +++++++++++++++++++ arch/arm/mm/Kconfig | 2 +- 2 files changed, 20 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-spear13xx/spear13xx.c b/arch/arm/mach-spear13xx/spear13xx.c index c86bd1c..8c8a21d 100644 --- a/arch/arm/mach-spear13xx/spear13xx.c +++ b/arch/arm/mach-spear13xx/spear13xx.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -526,6 +527,17 @@ struct platform_device spear13xx_pcie_gadget2_device = { /* Do spear13xx familiy common initialization part here */ void __init spear13xx_init(void) { +#ifdef CONFIG_CACHE_L2X0 + /* + * 512KB (64KB/way), 8-way associativity, parity supported + * + * TODO: 0x249, picked from nomadik, to be analyzed + * Comment from nomadik: + * At full speed latency must be >=2, so 0x249 in low bits + */ + l2x0_init(__io_address(SPEAR13XX_L2CC_BASE), 0x00260249, 0xfe00ffff); +#endif + sdhci_enable(); } @@ -548,6 +560,13 @@ struct map_desc spear13xx_io_desc[] __initdata = { .pfn = __phys_to_pfn(SPEAR13XX_A9SM_PERIP_BASE), .length = SZ_8K, .type = MT_DEVICE +#ifdef CONFIG_CACHE_L2X0 + }, { + .virtual = IO_ADDRESS(SPEAR13XX_L2CC_BASE), + .pfn = __phys_to_pfn(SPEAR13XX_L2CC_BASE), + .length = SZ_4K, + .type = MT_DEVICE +#endif }, { .virtual = IO_ADDRESS(SPEAR13XX_MISC_BASE), .pfn = __phys_to_pfn(SPEAR13XX_MISC_BASE), diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index a0a2928..f3eea13 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig @@ -772,7 +772,7 @@ config CACHE_L2X0 depends on REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176 || \ REALVIEW_EB_A9MP || ARCH_MX35 || ARCH_MX31 || MACH_REALVIEW_PBX || \ ARCH_NOMADIK || ARCH_OMAP4 || ARCH_S5PV310 || ARCH_TEGRA || \ - ARCH_U8500 || ARCH_VEXPRESS_CA9X4 + ARCH_SPEAR13XX || ARCH_U8500 || ARCH_VEXPRESS_CA9X4 default y select OUTER_CACHE select OUTER_CACHE_SYNC