From patchwork Mon Jan 21 13:16:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: srinidhi kasagar X-Patchwork-Id: 2012291 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 39780DF23A for ; Mon, 21 Jan 2013 13:19:37 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TxHEi-0002Q5-QG; Mon, 21 Jan 2013 13:16:28 +0000 Received: from eu1sys200aog106.obsmtp.com ([207.126.144.121]) by merlin.infradead.org with smtps (Exim 4.76 #1 (Red Hat Linux)) id 1TxHEf-0002Nr-P6 for linux-arm-kernel@lists.infradead.org; Mon, 21 Jan 2013 13:16:26 +0000 Received: from beta.dmz-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob106.postini.com ([207.126.147.11]) with SMTP ID DSNKUP0/pUzDgiVyrA+F403WPX/eV2SAWZWO@postini.com; Mon, 21 Jan 2013 13:16:25 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 7ADDAD5; Mon, 21 Jan 2013 13:08:08 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id BAD93B99; Mon, 21 Jan 2013 13:16:18 +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 4707A24C07C; Mon, 21 Jan 2013 14:16:11 +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; Mon, 21 Jan 2013 14:16:17 +0100 Date: Mon, 21 Jan 2013 18:46:15 +0530 From: srinidhi kasagar To: Subject: [PATCH 3/4] ARM: mach-omap2: apply the errata at run time rather Message-ID: <20130121131613.GA29876@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-20130121_081626_019234_CF140165 X-CRM114-Status: GOOD ( 12.10 ) 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.121 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-omap@vger.kernel.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: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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..071ca1f 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 */ + bl l2x0_get_rtl_release + 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 */ + bl l2x0_get_rtl_release + 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