From patchwork Thu Dec 1 22:56:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Rokosov X-Patchwork-Id: 28578 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp528640wrr; Thu, 1 Dec 2022 14:59:57 -0800 (PST) X-Google-Smtp-Source: AA0mqf5ul0LlqAlogEMLPE4R9/gVjINx4/bJB7XlmnM81NsG1FeKZ02entUm1T7lqhvrDGehiM5L X-Received: by 2002:aa7:db47:0:b0:46b:1ed0:2702 with SMTP id n7-20020aa7db47000000b0046b1ed02702mr19246562edt.177.1669935597499; Thu, 01 Dec 2022 14:59:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669935597; cv=none; d=google.com; s=arc-20160816; b=eDfPb/d3NtMeF0tcEBGQ8tDeVJ++GpDJd9PdbaMCLGmFmVzzM34PdbkHX6DD3U9ieK RPPrI9xCBOWs7chC9ZOl8Eoz0lUqkX+oGVAUkgmS3+N+ZeQPnH728Y66moD4ELpT3joV rTMRAj3XsztyTw0F5BbnSLE8S5hSgimoA9ovEflFjLU5uQiiz2NOJVmSs+0i7E7LXwX1 EOSYzY9PorWuJF30UVoeClsuHzGov/QI0l3CpRI/NW7Aq6cf9kAx/RIQBoETwCXvC/Tk 7JE7YZ8BosPmOwvT3BrWPC/Uw83yHelvExT6LprA5/nGnqCQfW7tQL5PvvymilmYI6cB sORw== 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 :dkim-signature; bh=XU1bxoWrykCIxVdFR9T9KlwOWfuXOxPytqzRPXwAy18=; b=FrnR2q5XnXPTjs44C7qcrQTXHU6hBQljgZx5Eii6G9GFCFZOawCyQ0JCeDoFMspeDl UmVHNmCNUc5wfdUODLYe7Tro2BDn+J3fzwo+dFMUMccUgsp0ZTJMutQOry/qJwQtHAs2 /miiKhD6wtoNuZf1Ct1979KIGoWqfqMlWZpLibAr9QAPvDdDMrRD4p+4yprgC/xXSjT5 Co7fjGF7Sukd56pnqYUFPtqGEGBS7z/IT71B5gH4re827FIQ8jR7gW68cPf7A7ybbjDi TP5btI5Pb/H5za3YWMFZq8fUOuw+EIrAai7tWVaHJQutv2/abrcjypmzhzAh6tJm24ip m8hQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=ryfu3zlI; 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=sberdevices.ru Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dt3-20020a170907728300b00783ddc8b643si5196136ejc.317.2022.12.01.14.59.33; Thu, 01 Dec 2022 14:59:57 -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=@sberdevices.ru header.s=mail header.b=ryfu3zlI; 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=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231794AbiLAW6H (ORCPT + 99 others); Thu, 1 Dec 2022 17:58:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231644AbiLAW5k (ORCPT ); Thu, 1 Dec 2022 17:57:40 -0500 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A99B7A444; Thu, 1 Dec 2022 14:57:38 -0800 (PST) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id 1B0C85FD0E; Fri, 2 Dec 2022 01:57:32 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1669935452; bh=XU1bxoWrykCIxVdFR9T9KlwOWfuXOxPytqzRPXwAy18=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=ryfu3zlINlnEg5WtnhdYY0DhdKbMmieEI0hBQdTdjkPCeBQGMTCQbRzdCw+AZu06m QDiDgyC5NOf7a3jWRg1ENQGdvZIWexoDUcWWhqt0FeqRfEUTlgBHSGTKJDkhDLbitn b/ud1RDW3kZ13VMn1UxArrRtr/uQz/F7X5QvkaWn5bryeOPrrQh01iCBKDid4ul+l8 D4m6mT7WfYLYQ6vKaHOcGhHsJ0hPYZPdciLqQID7aBCpKC3wIBTUZGm82Ldp72ZQll xUVvBSvU3PDpZy6H44F/6Ay51Xq9aIin49Xh08FSJ331eJDqR1ALInjZt84MGePpna QlTzsFFVq4D6g== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Fri, 2 Dec 2022 01:57:32 +0300 (MSK) From: Dmitry Rokosov To: , , , , , , , CC: , , , , , , , , Dmitry Rokosov Subject: [PATCH v8 05/11] clk: meson: pll: export meson_clk_pll_wait_lock symbol Date: Fri, 2 Dec 2022 01:56:57 +0300 Message-ID: <20221201225703.6507-6-ddrokosov@sberdevices.ru> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20221201225703.6507-1-ddrokosov@sberdevices.ru> References: <20221201225703.6507-1-ddrokosov@sberdevices.ru> MIME-Version: 1.0 X-Originating-IP: [172.16.1.6] X-ClientProxiedBy: S-MS-EXCH02.sberdevices.ru (172.16.1.5) To S-MS-EXCH01.sberdevices.ru (172.16.1.4) X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2022/12/01 20:49:00 #20634374 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751054389124705311?= X-GMAIL-MSGID: =?utf-8?q?1751054389124705311?= Modern meson PLL IPs are a little bit different from early known PLLs. The main difference is located in the init/enable/disable sequences; the rate logic is the same. So drivers for the new PLLs can be inherited from the clk-pll driver and redefine init/enable/disable routines only. For that purpose we need to have meson_clk_pll_wait_lock() in the export symbols list, because each lock operation should be ended with wait cycles. Signed-off-by: Dmitry Rokosov --- drivers/clk/meson/clk-pll.c | 3 ++- drivers/clk/meson/clk-pll.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/clk/meson/clk-pll.c b/drivers/clk/meson/clk-pll.c index 9e55617bc3b4..81c810d57a48 100644 --- a/drivers/clk/meson/clk-pll.c +++ b/drivers/clk/meson/clk-pll.c @@ -273,7 +273,7 @@ static int meson_clk_pll_determine_rate(struct clk_hw *hw, return 0; } -static int meson_clk_pll_wait_lock(struct clk_hw *hw) +int meson_clk_pll_wait_lock(struct clk_hw *hw) { struct clk_regmap *clk = to_clk_regmap(hw); struct meson_clk_pll_data *pll = meson_clk_pll_data(clk); @@ -289,6 +289,7 @@ static int meson_clk_pll_wait_lock(struct clk_hw *hw) return -ETIMEDOUT; } +EXPORT_SYMBOL_GPL(meson_clk_pll_wait_lock); static int meson_clk_pll_init(struct clk_hw *hw) { diff --git a/drivers/clk/meson/clk-pll.h b/drivers/clk/meson/clk-pll.h index 367efd0f6410..85fec18c4b8a 100644 --- a/drivers/clk/meson/clk-pll.h +++ b/drivers/clk/meson/clk-pll.h @@ -47,4 +47,6 @@ extern const struct clk_ops meson_clk_pll_ro_ops; extern const struct clk_ops meson_clk_pll_ops; extern const struct clk_ops meson_clk_pcie_pll_ops; +int meson_clk_pll_wait_lock(struct clk_hw *hw); + #endif /* __MESON_CLK_PLL_H */