From patchwork Fri Nov 18 01:06:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Feng X-Patchwork-Id: 13047559 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 93AA5C43217 for ; Fri, 18 Nov 2022 01:07:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5l7kDYRh037+p1449wvgCgkGcONuhdGFDq7CoPlKtAc=; b=Zb8TF/pVcQCa3N pp70hpRfNU2km2sAiU797/+8MtBCMzSiQu7GQBG4pQzKHdELmZWr+88uxQ8ZHQF4XGFU0EZ/6Ibbq bLS9+vVC0sQ1Iwp1/sG8FE2B/YPpqcYIr2IN+VaOt0cDc27IxBFykZUdmwQfj/Hq3D5dbMXl85qzU pPkgCpdVhtQ78MEAvvebA39POWfBXRIAg8Amj2dFKBSA8naiHInUONEeqoFZ28NKXz8NIKsihJmVQ xg03wemA10/Naf+72GNA05RxXf6rZYnaaq8riZf8lovUmJFwMWS2JIbIQlEn6K0lRNkCviqVCpeuB QUsmbwZtk3RMoAVlyZ9A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovpr8-0017Eb-7e; Fri, 18 Nov 2022 01:07:46 +0000 Received: from fd01.gateway.ufhost.com ([61.152.239.71]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovpqx-0016yO-0E for linux-riscv@lists.infradead.org; Fri, 18 Nov 2022 01:07:36 +0000 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 8B7A824E047; Fri, 18 Nov 2022 09:06:39 +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; Fri, 18 Nov 2022 09:06:39 +0800 Received: from ubuntu.localdomain (183.27.96.116) by EXMBX072.cuchost.com (172.16.6.82) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 18 Nov 2022 09:06:38 +0800 From: Hal Feng To: , , CC: Conor Dooley , Palmer Dabbelt , "Rob Herring" , Krzysztof Kozlowski , Stephen Boyd , "Michael Turquette" , Philipp Zabel , Emil Renner Berthing , Hal Feng , Subject: [PATCH v2 14/14] clk: starfive: jh71x0: Don't register aux devices if JH7110 reset is disabled Date: Fri, 18 Nov 2022 09:06:27 +0800 Message-ID: <20221118010627.70576-15-hal.feng@starfivetech.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221118010627.70576-1-hal.feng@starfivetech.com> References: <20221118010627.70576-1-hal.feng@starfivetech.com> MIME-Version: 1.0 X-Originating-IP: [183.27.96.116] X-ClientProxiedBy: EXCAS064.cuchost.com (172.16.6.24) To EXMBX072.cuchost.com (172.16.6.82) X-YovoleRuleAgent: yovoleflag X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221117_170735_203664_A58290CA X-CRM114-Status: UNSURE ( 9.78 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org The JH7110 clock drivers will not register redundant auxiliary devices if the JH7110 reset auxiliary driver is disabled. Signed-off-by: Hal Feng --- drivers/clk/starfive/clk-starfive-jh71x0.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/clk/starfive/clk-starfive-jh71x0.c b/drivers/clk/starfive/clk-starfive-jh71x0.c index dda19c6937cb..4e69f56b00cc 100644 --- a/drivers/clk/starfive/clk-starfive-jh71x0.c +++ b/drivers/clk/starfive/clk-starfive-jh71x0.c @@ -333,7 +333,7 @@ const struct clk_ops *starfive_jh71x0_clk_ops(u32 max) } EXPORT_SYMBOL_GPL(starfive_jh71x0_clk_ops); -#if IS_ENABLED(CONFIG_CLK_STARFIVE_JH7110_SYS) +#if IS_ENABLED(CONFIG_RESET_STARFIVE_JH7110) static void jh7110_reset_unregister_adev(void *_adev) { @@ -384,4 +384,13 @@ int jh7110_reset_controller_register(struct jh71x0_clk_priv *priv, } EXPORT_SYMBOL_GPL(jh7110_reset_controller_register); +#else /* !CONFIG_RESET_STARFIVE_JH7110 */ + +int jh7110_reset_controller_register(struct jh71x0_clk_priv *priv, + const char *adev_name, + u32 adev_id) +{ + return 0; +} + #endif