From patchwork Wed Aug 20 09:18:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ye Li X-Patchwork-Id: 381661 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 69B3014010C for ; Wed, 20 Aug 2014 22:38:47 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2DE61A7400; Wed, 20 Aug 2014 14:38:46 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vhRRN4LM3nxX; Wed, 20 Aug 2014 14:38:45 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1B6D0A741B; Wed, 20 Aug 2014 14:38:33 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AC95A4A04A for ; Wed, 20 Aug 2014 11:19:08 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1xurPirdUL-A for ; Wed, 20 Aug 2014 11:19:05 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2lp0210.outbound.protection.outlook.com [207.46.163.210]) by theia.denx.de (Postfix) with ESMTPS id 3AFC44A044 for ; Wed, 20 Aug 2014 11:19:01 +0200 (CEST) Received: from CH1PR03CA009.namprd03.prod.outlook.com (10.255.156.154) by BN1PR03MB249.namprd03.prod.outlook.com (10.255.200.13) with Microsoft SMTP Server (TLS) id 15.0.1010.18; Wed, 20 Aug 2014 09:18:46 +0000 Received: from BN1AFFO11FD030.protection.gbl (10.255.156.132) by CH1PR03CA009.outlook.office365.com (10.255.156.154) with Microsoft SMTP Server (TLS) id 15.0.1010.18 via Frontend Transport; Wed, 20 Aug 2014 09:18:45 +0000 Received: from az84smr01.freescale.net (192.88.158.2) by BN1AFFO11FD030.mail.protection.outlook.com (10.58.52.168) with Microsoft SMTP Server (TLS) id 15.0.1010.11 via Frontend Transport; Wed, 20 Aug 2014 09:18:45 +0000 Received: from dissersh1-WorkStation.ap.freescale.net (dissersh1-WorkStation.ap.freescale.net [10.192.241.185]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id s7K9Igmv022416; Wed, 20 Aug 2014 02:18:43 -0700 From: Ye.Li To: Date: Wed, 20 Aug 2014 17:18:24 +0800 Message-ID: <1408526304-27070-1-git-send-email-Ye.Li@freescale.com> X-Mailer: git-send-email 1.7.9.5 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:CAL; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(6009001)(199003)(189002)(46102001)(6806004)(92566001)(83072002)(93916002)(92726001)(85852003)(79102001)(44976005)(77982001)(20776003)(76482001)(64706001)(19580405001)(88136002)(21056001)(19580395003)(81342001)(83322001)(77156001)(47776003)(84676001)(105606002)(48376002)(62966002)(107046002)(69596002)(81156004)(81542001)(106466001)(36756003)(97736001)(68736004)(95666004)(87286001)(104166001)(85306004)(99396002)(104016003)(86362001)(102836001)(89996001)(80022001)(31966008)(50466002)(74662001)(74502001)(4396001)(110136001)(50986999)(26826002)(50226001)(87936001)(2351001)(229853001); DIR:OUT; SFP:; SCL:1; SRVR:BN1PR03MB249; H:az84smr01.freescale.net; FPR:; MLV:ovrnspm; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;UriScan:; X-Forefront-PRVS: 03094A4065 Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=Ye.Li@freescale.com; X-OriginatorOrg: freescale.com X-Mailman-Approved-At: Wed, 20 Aug 2014 14:38:29 +0200 Cc: fabio.estevam@freescale.com, u-boot@lists.denx.de Subject: [U-Boot] [PATCH] iMX6: Disable the L2 before chaning the PL310 latency X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: "Ye.Li" The Latency parameters of PL310 Tag RAM latency control register and Data RAM Latency control register are set in L2 cache enable. And setting these registers must have PL310 NOT enabled. But when using Plugin mode boot, the PL310 is enabled by bootrom. The patch disables the PL310 before applying this setting. Signed-off-by: Ye.Li --- arch/arm/cpu/armv7/mx6/soc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c index f20bdeb..cc2231a 100644 --- a/arch/arm/cpu/armv7/mx6/soc.c +++ b/arch/arm/cpu/armv7/mx6/soc.c @@ -394,6 +394,9 @@ void v7_outer_cache_enable(void) } #endif + /* Must disable the L2 before changing the latency parameters */ + clrbits_le32(&pl310->pl310_ctrl, L2X0_CTRL_EN); + writel(0x132, &pl310->pl310_tag_latency_ctrl); writel(0x132, &pl310->pl310_data_latency_ctrl);