Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5626394rwb; Tue, 22 Nov 2022 02:40:28 -0800 (PST) X-Google-Smtp-Source: AA0mqf5n/kO/gynBQQH6+dyZ0CuljYwbQZnYciEMKGnbxkTHT9nzJpYleckF/KMAISGZPATDvvYf X-Received: by 2002:a17:906:a18c:b0:7ad:9629:fb96 with SMTP id s12-20020a170906a18c00b007ad9629fb96mr3088504ejy.751.1669113627822; Tue, 22 Nov 2022 02:40:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669113627; cv=none; d=google.com; s=arc-20160816; b=E2vDbKKk0XTPgQGSXJ4qkGnA4q40oSSOHreBrxMs4zELcVLm9OwznxBnR9iCPIW0zL bBqArzEQyr/pExqBwSlh5+auihG/mYWcTxy4B4+FLTnda1RPNRSO0Gr+qNxmHGCU8zti hxwNXSFG6X85kNEMRqIBSLJ1/P/t6AO2hwbj6OtxAGPuvwg2uJqCIurBDXuNhtIjRf7y 6jpRIHxXw5NxWVSfBrOOVtvUwT1P/Na1Y6L3w8oL80Rx1wvAtoC/+qJ5Rw5TPboMTaTe 82bLu4QPAfczlASG9he768StJmlHjSnVfyD0iMvFbbixQudMUyJtv4UTCVdOHJmr3hG9 bb1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=DosXtb2vLlyvScCJwD7EkwZ89iZZAvk0frbmPltB5hI=; b=luBni0OLc8C9vdx2zV2S/RbBpFtFmc4EVLOct2UtpUjhjqmH1aYH5Vj6sUDXbqTG3B EwlrzZHCJDOGgokcQOWD6600Gy3eyqu8wRErElEl2UsTH/vwKyUK3y0yhanjTzmf3g5d PnQM+obAriWPeN/LDoehXsMsKnHik9cAO44MCyuxT0KEQxgjf6Wl0AJ9M+/iuPifeKFH Y0Hnv5nLbUFnwLWAIyXB6flb3QqKtGSdzGkzfm82SifVjXSNCzae7yzrmzRaUtBwnXIv jZ6VctFKKJGqyYEzue2E2rmtOrKeS/k/Y9cAA7qzisgBBP8w25pOg+G44kmIF92VpYKy SMmw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w13-20020a05640234cd00b0046775196bdesi12597187edc.29.2022.11.22.02.40.05; Tue, 22 Nov 2022 02:40:27 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233058AbiKVJDX (ORCPT + 91 others); Tue, 22 Nov 2022 04:03:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233023AbiKVJDP (ORCPT ); Tue, 22 Nov 2022 04:03:15 -0500 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF957B4BD; Tue, 22 Nov 2022 01:03:06 -0800 (PST) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by fd01.gateway.ufhost.com (Postfix) with ESMTP id 1C08624E337; Tue, 22 Nov 2022 17:03:05 +0800 (CST) Received: from EXMBX072.cuchost.com (172.16.6.82) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 22 Nov 2022 17:03:05 +0800 Received: from [192.168.125.106] (113.72.144.23) by EXMBX072.cuchost.com (172.16.6.82) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 22 Nov 2022 17:03:04 +0800 Message-ID: Date: Tue, 22 Nov 2022 17:02:50 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.2 Subject: Re: [PATCH v2 5/8] soc: sifive: ccache: Add StarFive JH7110 support Content-Language: en-US To: Conor Dooley CC: "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" , Emil Renner Berthing , "linux-kernel@vger.kernel.org" References: <20221118011714.70877-1-hal.feng@starfivetech.com> <20221118011714.70877-6-hal.feng@starfivetech.com> From: Hal Feng In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [113.72.144.23] X-ClientProxiedBy: EXCAS064.cuchost.com (172.16.6.24) To EXMBX072.cuchost.com (172.16.6.82) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS 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 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 > > > > This adds support for the StarFive JH7110 SoC which also > > features this SiFive cache controller. > > > > Signed-off-by: Emil Renner Berthing > > Signed-off-by: Hal Feng > > --- > > arch/riscv/Kconfig.socs | 1 + > > drivers/soc/Makefile | 2 +- > > drivers/soc/sifive/Kconfig | 2 +- > > drivers/soc/sifive/sifive_ccache.c | 1 + > > 4 files changed, 4 insertions(+), 2 deletions(-) > > > > 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? > > > select SIFIVE_PLIC > > help > > This enables support for StarFive SoC platform hardware. > > diff --git a/drivers/soc/Makefile b/drivers/soc/Makefile > > index 69ba6508cf2c..534669840858 100644 > > --- a/drivers/soc/Makefile > > +++ b/drivers/soc/Makefile > > @@ -26,7 +26,7 @@ obj-y += qcom/ > > obj-y += renesas/ > > obj-y += rockchip/ > > obj-$(CONFIG_SOC_SAMSUNG) += samsung/ > > -obj-$(CONFIG_SOC_SIFIVE) += sifive/ > > +obj-y += sifive/ > > This bit is fine. > > > obj-y += sunxi/ > > obj-$(CONFIG_ARCH_TEGRA) += tegra/ > > obj-y += ti/ > > diff --git a/drivers/soc/sifive/Kconfig b/drivers/soc/sifive/Kconfig > > index ed4c571f8771..e86870be34c9 100644 > > --- a/drivers/soc/sifive/Kconfig > > +++ b/drivers/soc/sifive/Kconfig > > @@ -1,6 +1,6 @@ > > # SPDX-License-Identifier: GPL-2.0 > > > > -if SOC_SIFIVE > > +if SOC_SIFIVE || SOC_STARFIVE > > As I suppose is this - but hardly scalable. I suppose it doesn't really > matter. > > > 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. Best regards, Hal