Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2D510C433EF for ; Fri, 18 Mar 2022 11:13:51 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5D1BF81DD3; Fri, 18 Mar 2022 12:13:48 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=timesintelli.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 222A181DD3; Fri, 18 Mar 2022 11:16:56 +0100 (CET) Received: from out29-221.mail.aliyun.com (out29-221.mail.aliyun.com [115.124.29.221]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5BF0A81111 for ; Fri, 18 Mar 2022 11:16:51 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=timesintelli.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=haifeng.li@timesintelli.com X-Alimail-AntiSpam: AC=CONTINUE; BC=0.4400728|-1; BR=01201311R201S91rulernew998_84748_2000303; CH=blue; DM=|CONTINUE|false|; DS=CONTINUE|ham_system_inform|0.00889251-0.000136274-0.990971; FP=17274454710533608907|1|1|3|16515934369957261001|1|1|3; HT=ay29a033018047207; MF=haifeng.li@timesintelli.com; NM=1; PH=DS; RN=3; RT=3; SR=0; TI=SMTPD_---.N7N04Ez_1647598606; Received: from XTZJ20210422GJ(mailfrom:haifeng.li@timesintelli.com fp:SMTPD_---.N7N04Ez_1647598606) by smtp.aliyun-inc.com(33.32.109.194); Fri, 18 Mar 2022 18:16:46 +0800 From: To: , Cc: Subject: [PATCH]armv7: cache: support L2 cache disable Date: Fri, 18 Mar 2022 18:16:45 +0800 Message-ID: <002901d83ab1$456578d0$d0306a70$@timesintelli.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_002A_01D83AF4.5388DFE0" X-Mailer: Microsoft Outlook 16.0 Thread-Index: Adg6sMncmirZDoLbQ+y76JzCw/iaSw== Content-Language: zh-cn X-Mailman-Approved-At: Fri, 18 Mar 2022 12:13:46 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean This is a multipart message in MIME format. ------=_NextPart_000_002A_01D83AF4.5388DFE0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit PL310 is the L2$ controller from ARM used in many SoCs. Before jumping to linux, UBoot will call v7_outer_cache_disable in cleanup_before_linux_select to disable L2$. This patch is to support cache disable of PL310. Signed-off-by: Haifeng Li arch/arm/lib/cache-pl310.c | 5 +++++ 1 file changed, 5 insertions(+) ------=_NextPart_000_002A_01D83AF4.5388DFE0 Content-Type: application/octet-stream; name="0001-armv7-cache-support-L2-cache-disable.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-armv7-cache-support-L2-cache-disable.patch" From d8c2e404521e22ae582dffc2738e2e6ea7c6fc81 Mon Sep 17 00:00:00 2001=0A= From: Haifeng Li =0A= Date: Fri, 18 Mar 2022 17:08:55 +0800=0A= Subject: [PATCH 1/1] armv7: cache: support L2 cache disable=0A= =0A= PL310 is the L2$ controller from ARM used in many SoCs. Before jumping=0A= to linux, UBoot will call v7_outer_cache_disable in=0A= cleanup_before_linux_select to disable L2$. This patch is to support=0A= cache disable of PL310.=0A= =0A= Signed-off-by: Haifeng Li =0A= ---=0A= arch/arm/lib/cache-pl310.c | 5 +++++=0A= 1 file changed, 5 insertions(+)=0A= =0A= diff --git a/arch/arm/lib/cache-pl310.c b/arch/arm/lib/cache-pl310.c=0A= index bbaaaa4157..4fd6eda07a 100644=0A= --- a/arch/arm/lib/cache-pl310.c=0A= +++ b/arch/arm/lib/cache-pl310.c=0A= @@ -13,6 +13,11 @@=0A= =0A= struct pl310_regs *const pl310 =3D (struct pl310_regs = *)CONFIG_SYS_PL310_BASE;=0A= =0A= +void v7_outer_cache_disable(void)=0A= +{=0A= + writel(0, &pl310->pl310_ctrl);=0A= +}=0A= +=0A= static void pl310_cache_sync(void)=0A= {=0A= writel(0, &pl310->pl310_cache_sync);=0A= -- =0A= 2.17.1=0A= =0A= ------=_NextPart_000_002A_01D83AF4.5388DFE0--