From patchwork Fri Jul 22 04:38:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 72595 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp797741qga; Thu, 21 Jul 2016 21:37:28 -0700 (PDT) X-Received: by 10.28.154.21 with SMTP id c21mr2723067wme.63.1469162247993; Thu, 21 Jul 2016 21:37:27 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id y135si7828869wmc.71.2016.07.21.21.37.27; Thu, 21 Jul 2016 21:37:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6B1B1A763F; Fri, 22 Jul 2016 06:37:17 +0200 (CEST) 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 65XUhapErF7Z; Fri, 22 Jul 2016 06:37:17 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 138A4A766D; Fri, 22 Jul 2016 06:37:08 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AFC90A7533 for ; Fri, 22 Jul 2016 06:36:58 +0200 (CEST) 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 yykjAXbWsqh5 for ; Fri, 22 Jul 2016 06:36:58 +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 conuserg-08.nifty.com (conuserg-08.nifty.com [210.131.2.75]) by theia.denx.de (Postfix) with ESMTPS id 08AD2A7560 for ; Fri, 22 Jul 2016 06:36:54 +0200 (CEST) Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id u6M4amRj019169; Fri, 22 Jul 2016 13:36:49 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com u6M4amRj019169 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1469162209; bh=ipNNvTXq4yojijOGvoDtREWs2ro8dPsY9o9T0Vi//HY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J87JM/xbrUkiNrUEjnlxKE/m1XVlZh8gFOE5iGsPKVwooLg89Z1ciXygHwPe+5M4B GG1j08iLAzx9UTHiRxNnecF62E11sLADg3OA9Oens5ceXiiQ44F0TigPnNXdXfQirr qztVzx9B6/+cIX+hh2azSXcgXS3YuEhICQDPITGOLWPb3giNG0U9psLoZjfXJoRW2p 9yMEkrf7aCBAyOk2Sy8VFjkiJLWmhnXVFCcKFkZo8X6av9nMe7dYXH56q2PCEvMh8b G0FxlJ226bP26SCyN3RAG5BFmQ5ZYs/eHHZVOK34/czHukmPv2G2sfYeEnYdrrb1JB AaAPKUK01w1+Q== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Fri, 22 Jul 2016 13:38:30 +0900 Message-Id: <1469162313-17027-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1469162313-17027-1-git-send-email-yamada.masahiro@socionext.com> References: <1469162313-17027-1-git-send-email-yamada.masahiro@socionext.com> Subject: [U-Boot] [PATCH 1/4] ARM: uniphier: clear notification flag before L2 operation X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Clear the flag immediately before cache operation to not depend on the previous state. Signed-off-by: Masahiro Yamada --- arch/arm/mach-uniphier/arm32/cache_uniphier.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/arch/arm/mach-uniphier/arm32/cache_uniphier.c b/arch/arm/mach-uniphier/arm32/cache_uniphier.c index 4398114..3d984a7 100644 --- a/arch/arm/mach-uniphier/arm32/cache_uniphier.c +++ b/arch/arm/mach-uniphier/arm32/cache_uniphier.c @@ -19,6 +19,9 @@ static void uniphier_cache_sync(void) static void uniphier_cache_maint_all(u32 operation) { + /* clear the complete notification flag */ + writel(SSCOLPQS_EF, SSCOLPQS); + /* try until the command is successfully set */ do { writel(SSCOQM_S_ALL | SSCOQM_CE | operation, SSCOQM); @@ -28,9 +31,6 @@ static void uniphier_cache_maint_all(u32 operation) while (readl(SSCOLPQS) != SSCOLPQS_EF) ; - /* clear the complete notification flag */ - writel(SSCOLPQS_EF, SSCOLPQS); - uniphier_cache_sync(); } @@ -46,6 +46,9 @@ void v7_outer_cache_inval_all(void) static void __uniphier_cache_maint_range(u32 start, u32 size, u32 operation) { + /* clear the complete notification flag */ + writel(SSCOLPQS_EF, SSCOLPQS); + /* try until the command is successfully set */ do { writel(SSCOQM_S_ADDRESS | SSCOQM_CE | operation, SSCOQM); @@ -57,9 +60,6 @@ static void __uniphier_cache_maint_range(u32 start, u32 size, u32 operation) /* wait until the operation is completed */ while (readl(SSCOLPQS) != SSCOLPQS_EF) ; - - /* clear the complete notification flag */ - writel(SSCOLPQS_EF, SSCOLPQS); } static void uniphier_cache_maint_range(u32 start, u32 end, u32 operation)