From patchwork Tue Jan 29 10:17:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: srinidhi kasagar X-Patchwork-Id: 2060881 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 8CB97DF23E for ; Tue, 29 Jan 2013 10:20:19 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U08GE-0001dm-LP; Tue, 29 Jan 2013 10:17:50 +0000 Received: from eu1sys200aog111.obsmtp.com ([207.126.144.131]) by merlin.infradead.org with smtps (Exim 4.76 #1 (Red Hat Linux)) id 1U08Fm-0001Q7-K1 for linux-arm-kernel@lists.infradead.org; Tue, 29 Jan 2013 10:17:23 +0000 Received: from beta.dmz-us.st.com ([167.4.1.35]) (using TLSv1) by eu1sys200aob111.postini.com ([207.126.147.11]) with SMTP ID DSNKUQehrVSiSqsx1/Nz6M401OwkM/avylL0@postini.com; Tue, 29 Jan 2013 10:17:21 UTC Received: from zeta.dmz-us.st.com (ns4.st.com [167.4.16.71]) by beta.dmz-us.st.com (STMicroelectronics) with ESMTP id C8D8C47; Tue, 29 Jan 2013 10:16:31 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-us.st.com (STMicroelectronics) with ESMTP id 8FA3E91; Tue, 29 Jan 2013 04:30:07 +0000 (GMT) Received: from exdcvycastm022.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm022", Issuer "exdcvycastm022" (not verified)) by relay1.stm.gmessaging.net (Postfix) with ESMTPS id C410224C2E5; Tue, 29 Jan 2013 11:17:10 +0100 (CET) Received: from localhost (10.201.54.34) by exdcvycastm022.EQ1STM.local (10.230.100.30) with Microsoft SMTP Server (TLS) id 8.3.83.0; Tue, 29 Jan 2013 11:17:15 +0100 Date: Tue, 29 Jan 2013 15:47:13 +0530 From: srinidhi kasagar To: Subject: [PATCH v2 5/5] ARM: mach-omap2: apply the errata at run time rather Message-ID: <20130129101711.GA23311@bnru10> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130129_051722_906776_B874ED3B X-CRM114-Status: GOOD ( 11.61 ) X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [207.126.144.131 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: tony@atomide.com, santosh.shilimkar@ti.com 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: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Get the pl310 rtl revision number which is stashed by the l2x0 driver and apply the required errata ERRATA_727915 accordingly. Signed-off-by: srinidhi kasagar --- arch/arm/mach-omap2/sleep44xx.S | 25 +++++++++++++++++++++---- 1 files changed, 21 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-omap2/sleep44xx.S b/arch/arm/mach-omap2/sleep44xx.S index 88ff83a..7440f65 100644 --- a/arch/arm/mach-omap2/sleep44xx.S +++ b/arch/arm/mach-omap2/sleep44xx.S @@ -157,11 +157,19 @@ skip_scu_gp_set: ldrne r0, [r8, #L2X0_SAVE_OFFSET1] @ memory. cmp r0, #3 bne do_WFI -#ifdef CONFIG_PL310_ERRATA_727915 + /* Check for PL310_ERRATA_727915 */ + ldr r0, =l2x0_revision + cmp r0, #0x4 + beq dosmc + cmp r0, #0x5 + beq dosmc + b nosmc +dosmc: mov r0, #0x03 mov r12, #OMAP4_MON_L2X0_DBG_CTRL_INDEX DO_SMC -#endif + +nosmc: bl omap4_get_l2cache_base mov r2, r0 ldr r0, =0xffff @@ -171,11 +179,20 @@ wait: ldr r1, =0xffff ands r0, r0, r1 bne wait -#ifdef CONFIG_PL310_ERRATA_727915 + + /* Check for PL310_ERRATA_727915 */ + ldr r0, =l2x0_revision + cmp r0, #0x4 + beq dosmc2 + cmp r0, #0x5 + beq dosmc2 + b nosmc2 +dosmc2: mov r0, #0x00 mov r12, #OMAP4_MON_L2X0_DBG_CTRL_INDEX DO_SMC -#endif + +nosmc2: l2x_sync: bl omap4_get_l2cache_base mov r2, r0