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 3DC20ECAAA1 for ; Mon, 12 Sep 2022 06:57:29 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E7C54849D9; Mon, 12 Sep 2022 08:57:26 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1662965847; bh=6S6jAlAxQMebOqNhsG3oeNMYVly/tn1Dr7r7XEvipYc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=lTFD+3yeugUsGCI03z+AlSDO71sVLGRYCLXYbw8BgmUPFQoLCgUpxtUaGeQhg3tIi sKv3JCTW+wJ1PafM1r0kGBg0qGiuvzDyEmSd6fisnIGUbZmFkzaKGpxbQrECBEriFi FRkboCumEwERxYQTyNDi1SSaG0yyt8QRSWNLUrhYgJS6J3Fl5gg59DLnvFqrjk36GT 3uO6jGU7m+Lekovvgb03+Xu/BxENPoBnL26jR5AodHtiSA3vqv8j21fg3y1SgzDWEP cZ+9bkbkx36C8Dxc6YwCwPoCVQOzAZ1BjhMMKqEGdNBT7TOzpXklq7qysBc2bVwB/k GTyEbDHK4wiTg== Received: by phobos.denx.de (Postfix, from userid 109) id 0B822849F4; Mon, 12 Sep 2022 08:57:25 +0200 (CEST) Received: from mout-u-204.mailbox.org (mout-u-204.mailbox.org [IPv6:2001:67c:2050:101:465::204]) (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 BFE6384988 for ; Mon, 12 Sep 2022 08:57:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sr@denx.de Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-204.mailbox.org (Postfix) with ESMTPS id 4MQy8J6Hj4z9sQM; Mon, 12 Sep 2022 08:57:20 +0200 (CEST) Message-ID: <1e567298-e4c3-887b-2836-3822e216cb45@denx.de> Date: Mon, 12 Sep 2022 08:57:19 +0200 MIME-Version: 1.0 Subject: Re: [PATCH u-boot-marvell 1/5] arm: mvebu: Fix function enable_caches Content-Language: en-US To: =?UTF-8?Q?Marek_Beh=c3=ban?= Cc: pali@kernel.org, U-Boot Mailing List References: <20220908140654.7051-1-kabel@kernel.org> <20220908140654.7051-2-kabel@kernel.org> From: Stefan Roese In-Reply-To: <20220908140654.7051-2-kabel@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4MQy8J6Hj4z9sQM 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.6 at phobos.denx.de X-Virus-Status: Clean On 08.09.22 16:06, Marek Behún wrote: > From: Pali Rohár > > Commit 3308933d2fe9 ("arm: mvebu: Avoid reading MVEBU_REG_PCIE_DEVID > register too many times") broke support for caches on all Armada SoCs. > > Before that commit there was code: > > if (mvebu_soc_family() != MVEBU_SOC_A375) { > dcache_enable(); > } > > And after that commit there is code: > > if (IS_ENABLED(CONFIG_ARMADA_375)) { > dcache_enable(); > } > > Comment above this code says that d-cache should be disabled on Armada 375. > But new code inverted logic and broke Armada 375 and slowed down all other > Armada SoCs (including A38x). > > Fix this issue by changing logic to: > > if (!IS_ENABLED(CONFIG_ARMADA_375)) { > dcache_enable(); > } > > Which matches behavior prior that commit. > > Fixes: 3308933d2fe9 ("arm: mvebu: Avoid reading MVEBU_REG_PCIE_DEVID register too many times") > Signed-off-by: Pali Rohár > Signed-off-by: Marek Behún Reviewed-by: Stefan Roese Thanks, Stefan > --- > arch/arm/mach-mvebu/cpu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm/mach-mvebu/cpu.c b/arch/arm/mach-mvebu/cpu.c > index 1457af1d6a..b512ccc501 100644 > --- a/arch/arm/mach-mvebu/cpu.c > +++ b/arch/arm/mach-mvebu/cpu.c > @@ -663,7 +663,7 @@ void enable_caches(void) > * ethernet driver (mvpp2). So lets keep the d-cache disabled > * until this is solved. > */ > - if (IS_ENABLED(CONFIG_ARMADA_375)) { > + if (!IS_ENABLED(CONFIG_ARMADA_375)) { > /* Enable D-cache. I-cache is already enabled in start.S */ > dcache_enable(); > } Viele Grüße, Stefan Roese -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de