Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5628627rwb; Tue, 22 Nov 2022 02:42:48 -0800 (PST) X-Google-Smtp-Source: AA0mqf72fTHZh1m+ioqvsLn7XcqVW/QDDGlidMOyxfGcWcyrmoCIeHMTKjhD8z87NDAtSZukKGyn X-Received: by 2002:a17:906:7d50:b0:79e:4880:dd83 with SMTP id l16-20020a1709067d5000b0079e4880dd83mr9198874ejp.166.1669113767927; Tue, 22 Nov 2022 02:42:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669113767; cv=none; d=google.com; s=arc-20160816; b=quMTBbuoE8BxPhHx7ASMD8uQeAR/K7YcJhyQ1ojN7ENMcihsYA0qdHTdRChJ32dXTA N4aev3FYlc14dG+HoBwXf41aTQiOphAYczbBk2OG5wdo70K9rFEA4QZg6asylnDanBAo v9D6K4uzmYESb1XFHanGaPU+Yny6dxXeE+wsM+EZJvWXTGBbbQmZtT6fQM/OaOUh0i9z kQPQnf5pR3kZw8R1ki5kJt9HrDESrhDmfrzgBsf/3TGf8vin0nyOHn3gsIKBgVW36VfJ JR4+un9RN3MF5Oe0orZVc9Wsf8Bj14jlR9MzJwZ1KXlqE+Yp30JWGYPNdIojUmCr+XY/ T+mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=PvpYC63FzWnW4AplFhfEUidqMh75U+WiEOf1BBnACXE=; b=qL5WbEB+ZgHlkGrc9IhmZdURG03HilaDdZQf6/AHna1l/dsx0+TOg5/tp6I8M8LP76 IiBHAkWEYqSEyaywoapMIZhIYl1QQ3u5FMfCYz7U69w1b3cXnf4hrOhA24dQvsORihzd Mkt1tPLYI0wAkQg3RSUthrXpf3ZY+ecWMXL1WWERKr8J480Df0hSVwn9vFjwito8OIyW qyU1YJoWL5fx/+IXxm6ema7LYqPctIbVOJ/qOWHlyZ29fPPq7N7ABpZqWcpt2ISe3oqR oda7VtkL01s4gkHYfekEn50D54ampv/Vw84TUOQTFWngBjbTFP9DQaKSt3BbryI2jDBJ 6V9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=vmuYf9PJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d12-20020a170906640c00b00780ec98afafsi10407035ejm.113.2022.11.22.02.42.25; Tue, 22 Nov 2022 02:42:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=vmuYf9PJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232132AbiKVKNB (ORCPT + 92 others); Tue, 22 Nov 2022 05:13:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230111AbiKVKM5 (ORCPT ); Tue, 22 Nov 2022 05:12:57 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58DB865C6; Tue, 22 Nov 2022 02:12:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1669111972; x=1700647972; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=pkfiL1SWiTBuzefA52pcy+2yr5O15Ewlk9gdi/xHclw=; b=vmuYf9PJqvW58k7xcXP/Lkx92KNjScO4C6Zi6AroS/0lIb+T8ocXov+R LvwuPwbY3YIXsmF1tP3mTIc7jIgper50aansntIPc/D6Bkwiz+1XwJXzE Ngg0OaF118dOpTaQ98GFD2uw0NX1CX9c+J+Hc7o8yZRsBEsd8qJENN5vw y14EWxckaLSdS/rMeDurNnjbHnOEwTCGbbakUJomP7N22TVOcatpXDXKb bkpcDvvgG6kkfF4HSLg7o3fRSvdB3wujiiyyvRgau1+65BsDhvHyAPcR4 fp7gXHlRwzaVhoEYIbk3iZOT4jRKUJHxeXSF1RfbbJ9XmaQVEyVziGLC3 w==; X-IronPort-AV: E=Sophos;i="5.96,183,1665471600"; d="scan'208";a="124566194" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 22 Nov 2022 03:12:51 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.87.72) by chn-vm-ex02.mchp-main.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Tue, 22 Nov 2022 03:12:51 -0700 Received: from wendy (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12 via Frontend Transport; Tue, 22 Nov 2022 03:12:48 -0700 Date: Tue, 22 Nov 2022 10:12:30 +0000 From: Conor Dooley To: Emil Renner Berthing , CC: Hal Feng , Conor Dooley , "linux-riscv@lists.infradead.org" , "devicetree@vger.kernel.org" , Palmer Dabbelt , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Albert Ou , Ben Dooks , Thomas Gleixner , Marc Zyngier , Stephen Boyd , Michael Turquette , Philipp Zabel , Linus Walleij , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v2 5/8] soc: sifive: ccache: Add StarFive JH7110 support Message-ID: References: <20221118011714.70877-1-hal.feng@starfivetech.com> <20221118011714.70877-6-hal.feng@starfivetech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,T_SPF_TEMPERROR autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 22, 2022 at 10:54:34AM +0100, Emil Renner Berthing wrote: > On Tue, 22 Nov 2022 at 10:03, Hal Feng wrote: > > On Fri, 18 Nov 2022 19:45:57 +0800, Conor Dooley wrote: > > > Hey Emil/Hal, > > > On Fri, Nov 18, 2022 at 09:17:11AM +0800, Hal Feng wrote: > > > > From: Emil Renner Berthing > > > > diff --git a/arch/riscv/Kconfig.socs b/arch/riscv/Kconfig.socs > > > > index 69774bb362d6..5a40e05f8cab 100644 > > > > --- a/arch/riscv/Kconfig.socs > > > > +++ b/arch/riscv/Kconfig.socs > > > > @@ -22,6 +22,7 @@ config SOC_STARFIVE > > > > bool "StarFive SoCs" > > > > select PINCTRL > > > > select RESET_CONTROLLER > > > > + select SIFIVE_CCACHE > > > > > > Please no. I am trying to get rid of these selects + I cannot figure out > > > why this driver is so important that you *need* to select it. Surely the > > > SoC is useable without it> > > > Is this a hang over from your vendor tree that uses the driver to do > > > non-coherent stuff for the jh7100? > > > > I have tested that the board can successfully boot up without the cache > > driver. The `select` can be removed for JH7110. @Emil, what do you think > > of this? > > Yes, for the JH7110 this is not strictly needed, just like the > Unmatched board. For the StarFive JH7100 it is though. > So if you're only adding support for the JH7110 then it's not needed. Even for the JH7100 there are other ways to do this than selects in arch/riscv - for example config SIFIVE_CCACHE default SOC_STARFIVE But you don't need that either if you're not adding the JH7100 :) > > > > config SIFIVE_CCACHE > > > > bool "Sifive Composable Cache controller" > > > > diff --git a/drivers/soc/sifive/sifive_ccache.c b/drivers/soc/sifive/sifive_ccache.c > > > > index 1c171150e878..9489d1a90fbc 100644 > > > > --- a/drivers/soc/sifive/sifive_ccache.c > > > > +++ b/drivers/soc/sifive/sifive_ccache.c > > > > @@ -107,6 +107,7 @@ static const struct of_device_id sifive_ccache_ids[] = { > > > > { .compatible = "sifive,fu540-c000-ccache" }, > > > > { .compatible = "sifive,fu740-c000-ccache" }, > > > > { .compatible = "sifive,ccache0" }, > > > > + { .compatible = "starfive,jh7110-ccache" }, > > > > > > Per my second reply to the previous patch, I am not sure why you do not > > > just have a fallback compatible in the binding/dt for the fu740 ccache > > > since you appear to have identical configuration? > > > > Yeah, I will use the compatible of fu740 and modify this patch. > > No, the JH7110 should not pretend to be a fu740, but if you add > > compatible = "starfive,jh7110-ccache", "sifive,ccache0"; > > then this driver should still match "sifive,ccache0" without adding > the "starfive,jh7110-ccache" entry. Either works for me :) If you go for "sifive,ccache0", just make sure to add the correct property enforcement - you can just copy the fu740 by the looks of things (although that'd imply that it is compatible and can fall back to it...) Thanks, Conor.