Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp4783916rwe; Mon, 17 Apr 2023 19:20:10 -0700 (PDT) X-Google-Smtp-Source: AKy350bhg2NWyKrcyRaCoXcJn3KApiBdGh2nZ98HOiE6azn/A0t0UonTPb8MfJLHcNFNER86GZ1O X-Received: by 2002:a05:6a00:1aca:b0:628:f0:51d4 with SMTP id f10-20020a056a001aca00b0062800f051d4mr18577633pfv.11.1681784409781; Mon, 17 Apr 2023 19:20:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681784409; cv=none; d=google.com; s=arc-20160816; b=ockQw+IPFM+qyoB87gH8w0LSZiWfMBiHr9aOBhu4mAx5GAHxVHY0Bd0vT+WaP4fiF8 cSIlR4lXeovwzudjPmdDPy3Gu+v0CnnfkRgpqOqGCB0fjQtgN6UIuTcDY1dUYbpk6ltm a9KVInuzp3FV2KcP2tLJRgzwadTOU5u8gel0/Flz6266S+uTOA2pyoPAOUrnHfeTCnmU HgKqzdka/GMvRTmtMgYkHzHaBf+qPzRIIFgWtA0/bWR1knGpPWJGaS4jYLhKR9rAcHFP 7uxFQm/LCCO0OjvoNpjQKlu0rEXYkelAeyP23xECDWriKLdN9Ap0ZfhNtz70OvhV/d4j P6Rg== 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=WsW+hxjFUWQVCP3sjL4WrINQbYnLfGoV4DQrgygdKzg=; b=ArAvpSjjlL4luYlJHkrriduVz+rLZwxMx3jWzO8dtAgZYgr05ZS5UA1Fay9uaCUJL1 iCShqiGMlU1BoIX074hPlFg4pfLf/+mJrYmQwW9Gf2Yp02x+TwRqOwRy5K4IvVAf18+a lwmaOj1J7IyGCTfhROf1NPGkhX2h5Oqd4lm80tNKN4KbZwmGG2YXiD2UkLsFkvURDRnj glR7VatZQU2PjFgDHO4Hdljrs4TrryI26PHIxOf6Z6UeTATqmsUSxA8LL7OXS9qaPB7T +6MpH5gJ0c7wGrhsks58iR/Yw0QNBfUsDU7rWAKc2QneQ9IXSzAVXom5xk66OQrF9LgW G+Gg== 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 q7-20020aa79827000000b0063b8e23415esi4493716pfl.92.2023.04.17.19.19.55; Mon, 17 Apr 2023 19:20:09 -0700 (PDT) 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 S230349AbjDRCON (ORCPT + 99 others); Mon, 17 Apr 2023 22:14:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229901AbjDRCOM (ORCPT ); Mon, 17 Apr 2023 22:14:12 -0400 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC1C14202; Mon, 17 Apr 2023 19:14:09 -0700 (PDT) Received: from EXMBX166.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX166", Issuer "EXMBX166" (not verified)) by fd01.gateway.ufhost.com (Postfix) with ESMTP id 830D024E2AB; Tue, 18 Apr 2023 10:14:08 +0800 (CST) Received: from EXMBX172.cuchost.com (172.16.6.92) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 18 Apr 2023 10:14:08 +0800 Received: from [192.168.125.87] (113.72.144.253) by EXMBX172.cuchost.com (172.16.6.92) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 18 Apr 2023 10:14:07 +0800 Message-ID: Date: Tue, 18 Apr 2023 10:14:06 +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 v1 1/2] clk: starfive: Fix RESET_STARFIVE_JH7110 can't be selected in a specified case Content-Language: en-US To: Stephen Boyd , Conor Dooley CC: , , , Michael Turquette , "Paul Gazzillo" , Necip Fazil Yildiran , Emil Renner Berthing , Xingyu Wu , References: <20230417074115.30786-1-hal.feng@starfivetech.com> <20230417074115.30786-2-hal.feng@starfivetech.com> <20230417-buckwheat-wilt-92a4e85a5ca0@wendy> <83c5a35a-c646-cbc7-83f9-c02fcb24e069@starfivetech.com> <20230417-bolster-vitality-89d279146497@wendy> <0fe42faa3b34f82cc2fb73ae61460bf2.sboyd@kernel.org> From: Hal Feng In-Reply-To: <0fe42faa3b34f82cc2fb73ae61460bf2.sboyd@kernel.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [113.72.144.253] X-ClientProxiedBy: EXCAS064.cuchost.com (172.16.6.24) To EXMBX172.cuchost.com (172.16.6.92) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Mon, 17 Apr 2023 17:22:01 -0700, Stephen Boyd wrote: > Quoting Conor Dooley (2023-04-17 03:18:35) >> On Mon, Apr 17, 2023 at 06:06:29PM +0800, Hal Feng wrote: >> > On Mon, 17 Apr 2023 10:54:09 +0100, Conor Dooley wrote: >> > > On Mon, Apr 17, 2023 at 03:41:14PM +0800, Hal Feng wrote: >> > >> When (ARCH_STARFIVE [=n] && COMPILE_TEST [=y] && RESET_CONTROLLER [=n]), >> > >> RESET_STARFIVE_JH7110 can't be selected by CLK_STARFIVE_JH7110_SYS >> > >> and CLK_STARFIVE_JH7110_AON. >> > >> >> > >> Considering RESET_STARFIVE_JH7110 is not a necessary option for compilation >> > >> test, we should select it only if ARCH_STARFIVE=y. Also, delete redundant >> > >> selected options of CLK_STARFIVE_JH7110_AON because these options are >> > >> already selected by the dependency. >> > >> >> > >> Fixes: edab7204afe5 ("clk: starfive: Add StarFive JH7110 system clock driver") >> > >> Fixes: b2ab3c94f41f ("clk: starfive: Add StarFive JH7110 always-on clock driver") >> > >> Signed-off-by: Hal Feng >> > >> --- >> > >> drivers/clk/starfive/Kconfig | 5 +---- >> > >> 1 file changed, 1 insertion(+), 4 deletions(-) >> > >> >> > >> diff --git a/drivers/clk/starfive/Kconfig b/drivers/clk/starfive/Kconfig >> > >> index 71c1148ee5f6..3fad4adee841 100644 >> > >> --- a/drivers/clk/starfive/Kconfig >> > >> +++ b/drivers/clk/starfive/Kconfig >> > >> @@ -26,7 +26,7 @@ config CLK_STARFIVE_JH7110_SYS >> > >> depends on ARCH_STARFIVE || COMPILE_TEST >> > >> select AUXILIARY_BUS >> > >> select CLK_STARFIVE_JH71X0 >> > >> - select RESET_STARFIVE_JH7110 >> > >> + select RESET_STARFIVE_JH7110 if ARCH_STARFIVE >> > > >> > > Hmm, I don't really follow the logic above. >> > > Why not just make the if be `if RESET_CONTROLLER` rather than >> > > ARCH_STARFIVE? >> > > I'm probably missing some obvious reason why not. >> > >> > Note that RESET_CONTROLLER is selected by ARCH_STARFIVE. Thanks. >> >> Aye, just the explicit dependency seems like it'd be less fragile and >> more obvious in the future. > > Agreed. Be explicit so we don't have to hunt down select dependencies. With further consideration, on the other hand, if we set `if ARCH_STARFIVE` here, it can point out that we need the reset driver to boot up JH7110 besides the clock drivers, and the reset driver is not a necessary option for compilation test. So the reset driver is independent to the clock drivers when you doing a compilation test. If we set `if RESET_CONTROLLER` here, the reset driver will be compiled automatically when (ARCH_STARFIVE [=n] && COMPILE_TEST [=y] && RESET_CONTROLLER [=y] && CLK_STARFIVE_JH7110_SYS [=y]). Best regards, Hal