Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2862446rwb; Thu, 17 Nov 2022 17:49:20 -0800 (PST) X-Google-Smtp-Source: AA0mqf7uRUmhS41fsr6a2LRCjaPYrWkD8auWPc4z36eBE1UzfsL/4GTCsMBGk/P68r0EGV0CtIcn X-Received: by 2002:a17:90b:3d0a:b0:213:3521:f83a with SMTP id pt10-20020a17090b3d0a00b002133521f83amr5383112pjb.84.1668736160366; Thu, 17 Nov 2022 17:49:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668736160; cv=none; d=google.com; s=arc-20160816; b=FExW2583K8w3TGI/mkdTUV+Q0hpAm0Gh70bBR485clu8IGCzkX64loik8oBXrc043W Uu2I8ltosAUjYMwRr6ubrqJleB7/j/zphJPR9tFm3QuUXBLhB73Bmz61NO8Hn0o/fJ52 8iKF46mfU6+kwC+jhCuVx48CcHSe7ctxeAkgP2SMDMjPnhdGLyhdcCtpbEEi7k3OegjX EO7N6v1O/tHZF69vlyEU2sq/DzRBSqjWuUKl5GSyANnuFGnSEBGBvrJVkBhwrF2MdBK9 XXRw0wCruIdDVwG78x5Ma+XQoAXggy9Pgux1BIg3ORjLEB1TvlYId/7qH326R7bQBp7G m4IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=hxvipUfpa7Cyk/CmrPDmoiYpdHervXSnRVQ2//mm6HA=; b=VnT1Sw9tSopgp+RT11D0jRuk/Q48h9+HEeiRgtDYTxk1I8nLcV29cwgf30uNFR0pf5 vXt4NHD4UUUclpzQX5N5dP2bo+e72MkecqHODcPySZdPq0+2RAnDaEjcecHBXDOb2+sR Btx6moW5C2rZ7A2Sk4ixRniaIEAHxuw7TM32oKhgLU7tXjxkp3q/vELgMawFBao/SMtD ZgFyhH8CUW3OR8N1bZxUfWmII9QNkS79fUTqu+oRVMCo7zZ9fBYEC3SBlyv0225eJazi NZtbHjZGpEKqucePHUFI4aoa0rR4+dkpbdli7VMoA3jhHDB1LZYjCerDQDEhd70SJEHG P2XQ== 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 d17-20020a17090ad99100b0020af2411705si2073462pjv.104.2022.11.17.17.49.09; Thu, 17 Nov 2022 17:49:20 -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 S240956AbiKRBoP convert rfc822-to-8bit (ORCPT + 91 others); Thu, 17 Nov 2022 20:44:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240912AbiKRBoN (ORCPT ); Thu, 17 Nov 2022 20:44:13 -0500 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D891473B98; Thu, 17 Nov 2022 17:44:12 -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 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 Content-Type: text/plain 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 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 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 -- 2.38.1