From patchwork Fri Nov 11 09:38:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 623878 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88592C43219 for ; Fri, 11 Nov 2022 09:40:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233723AbiKKJkY (ORCPT ); Fri, 11 Nov 2022 04:40:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233713AbiKKJkR (ORCPT ); Fri, 11 Nov 2022 04:40:17 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0D3D6CA04; Fri, 11 Nov 2022 01:40:16 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 1EB6ACE2608; Fri, 11 Nov 2022 09:40:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 37F69C433D6; Fri, 11 Nov 2022 09:40:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668159611; bh=VAAWEKuCo1e53QmgMf0yNFFYiMrUPT/oqX01uL3eBHM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uYOMf9mBwZBbhzoMGhd/IP5+2FhdEyP88CEu1obynBoQyyOKBbQXgyxjkFgPgrIRw QiADi82aeD1qQW4NTIWVAs1f3Foft+0UQGES3SK3+l3x2SyDXd0GtQtNQIGBNGNP7m HforyS5UYvJld+GOz0Jvu5PFYXLbXrbaItQV0KY1f7ni7cjgsVJnc1a7Gd5MJ9bhKy WBQBebVFHWhhRxfNQRTQGT8Lq4gDqdt1f7/XkDN0CtH+DQ06L6IjAqfgI2sWXjsEzd uiUBKu2ynyv4+WR2zF2xED05NYlimf4sr64ll7gSZaFG2MmzBg4SZ/beIi1/xKVFmZ LvODC0yfkwmQQ== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1otQVj-0002xh-7c; Fri, 11 Nov 2022 10:39:43 +0100 From: Johan Hovold To: Vinod Koul , Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Dmitry Baryshkov , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 1/3] dt-bindings: phy: qcom,sc8280xp-qmp-usb3-uni: drop reference-clock source Date: Fri, 11 Nov 2022 10:38:55 +0100 Message-Id: <20221111093857.11360-2-johan+linaro@kernel.org> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221111093857.11360-1-johan+linaro@kernel.org> References: <20221111093857.11360-1-johan+linaro@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The source clock for the reference clock is not used by the PHY directly and should not be included in the devicetree binding. Fixes: e8e58e29a0c9 ("dt-bindings: phy: qcom,qmp-usb: fix sc8280xp binding") Signed-off-by: Johan Hovold Reviewed-by: Krzysztof Kozlowski --- .../bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml index ef080509747a..16fce1038285 100644 --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml @@ -22,12 +22,11 @@ properties: maxItems: 1 clocks: - maxItems: 5 + maxItems: 4 clock-names: items: - const: aux - - const: ref_clk_src - const: ref - const: com_aux - const: pipe @@ -82,12 +81,10 @@ examples: reg = <0x088ef000 0x2000>; clocks = <&gcc GCC_USB3_MP_PHY_AUX_CLK>, - <&rpmhcc RPMH_CXO_CLK>, <&gcc GCC_USB3_MP0_CLKREF_CLK>, <&gcc GCC_USB3_MP_PHY_COM_AUX_CLK>, <&gcc GCC_USB3_MP_PHY_PIPE_0_CLK>; - clock-names = "aux", "ref_clk_src", "ref", "com_aux", - "pipe"; + clock-names = "aux", "ref", "com_aux", "pipe"; power-domains = <&gcc USB30_MP_GDSC>; From patchwork Fri Nov 11 09:42:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 625788 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93BCEC433FE for ; Fri, 11 Nov 2022 09:43:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233236AbiKKJnZ (ORCPT ); Fri, 11 Nov 2022 04:43:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233685AbiKKJnS (ORCPT ); Fri, 11 Nov 2022 04:43:18 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71AFE78787; Fri, 11 Nov 2022 01:43:17 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 04A8C61F2C; Fri, 11 Nov 2022 09:43:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5BF55C4347C; Fri, 11 Nov 2022 09:43:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668159796; bh=NPLRtc4/Xi9APO2NAgfGkGH+wyMbp8HKKo8ZM8BktiM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SmTC1BBmrJxXcYYRf0fP3bXS4z3EM0EYWeLP9UXr0ulim3nf06NrmRvF0HfJ766kw Krzq1iH5aamZYtsRKqYQys8BlObh/bzCX2qSY3SFPTXmlaiYqtcWG87lhR24fM8sP0 5gNN2VHtaOnvBJQpxwSYonvdk/s6oGfLO+0EbBxTJWLXmR910uSHEki/mEYO9Xw5oV eH3jhao8g3WxHqBVVdYmZjD2SXW3hml5ViNpgpCQUUYuRIfUx8KULpVyiRy41cGTth oMA5bB0MpqmKi9xbz5TTUdIyISQR34+nr8/uPuPFVDFjEmC65DzU+7Hc6sajR09qgC VjiwEg8w5zU8g== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1otQYi-00030d-I4; Fri, 11 Nov 2022 10:42:48 +0100 From: Johan Hovold To: Vinod Koul Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Dmitry Baryshkov , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 2/3] phy: qcom-qmp-usb: drop redundant clock allocation Date: Fri, 11 Nov 2022 10:42:38 +0100 Message-Id: <20221111094239.11547-3-johan+linaro@kernel.org> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221111094239.11547-1-johan+linaro@kernel.org> References: <20221111094239.11547-1-johan+linaro@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Since the QMP driver split, there is no reason to allocate the fixed-rate pipe clock structure separately from the driver data. Signed-off-by: Johan Hovold --- drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c index 8b111b7087b9..27f2398ebf08 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c @@ -1485,6 +1485,8 @@ struct qmp_usb { enum phy_mode mode; struct phy *phy; + + struct clk_fixed_rate pipe_clk_fixed; }; static inline void qphy_setbits(void __iomem *base, u32 offset, u32 val) @@ -2357,7 +2359,7 @@ static void phy_clk_release_provider(void *res) */ static int phy_pipe_clk_register(struct qmp_usb *qmp, struct device_node *np) { - struct clk_fixed_rate *fixed; + struct clk_fixed_rate *fixed = &qmp->pipe_clk_fixed; struct clk_init_data init = { }; int ret; @@ -2367,10 +2369,6 @@ static int phy_pipe_clk_register(struct qmp_usb *qmp, struct device_node *np) return ret; } - fixed = devm_kzalloc(qmp->dev, sizeof(*fixed), GFP_KERNEL); - if (!fixed) - return -ENOMEM; - init.ops = &clk_fixed_rate_ops; /* controllers using QMP phys use 125MHz pipe clock interface */ From patchwork Fri Nov 11 09:42:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 623877 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4883DC4332F for ; Fri, 11 Nov 2022 09:43:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233510AbiKKJn0 (ORCPT ); Fri, 11 Nov 2022 04:43:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233686AbiKKJnS (ORCPT ); Fri, 11 Nov 2022 04:43:18 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71A1F78782; Fri, 11 Nov 2022 01:43:17 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 084D361F2D; Fri, 11 Nov 2022 09:43:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5DF7EC43142; Fri, 11 Nov 2022 09:43:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668159796; bh=TzRtDoyAfzMufPd65BGkX4pJ/DMl35ij09Pc1cMge34=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AkV9KHrhRaLPwJse3DLZBzlWclo57AXP2hdYhe7qInV7pfqF1KTZLt8OMfbx06k+r o9GGULfLHoOYWvqVHiK/U//cKrOV5fQEIgyp82qL6bkblNQBoFr0UWNXpefv0i3vQo UhF2MbjxzLtaebXZnrwmJWD3RRmzZcMEEUBXYlvKnpVPB0Uj+BRPBT7YvqxZpQFyVM bE1LRoirVW/mSJ5d2+oiuKEcDZ8mucVDY5C9hRZ7fZiKu8BJGI6gdKRcyibQcdW9EW TMLCzMJbtt+Hqv4Jl0/GqRZLjftDUwTEsdFe0ry78I9NZwRHxcmFN/4y45/JZd7qHM 3mbwPHT3w88QQ== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1otQYi-00030f-Kx; Fri, 11 Nov 2022 10:42:48 +0100 From: Johan Hovold To: Vinod Koul Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Dmitry Baryshkov , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 3/3] phy: qcom-qmp-pcie: drop redundant clock allocation Date: Fri, 11 Nov 2022 10:42:39 +0100 Message-Id: <20221111094239.11547-4-johan+linaro@kernel.org> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221111094239.11547-1-johan+linaro@kernel.org> References: <20221111094239.11547-1-johan+linaro@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Since the QMP driver split, there is no reason to allocate the fixed-rate pipe clock structure separately from the driver data. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c index 328708a09c37..68cafc9561ae 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c @@ -1546,6 +1546,8 @@ struct qmp_pcie { struct phy *phy; int mode; + + struct clk_fixed_rate pipe_clk_fixed; }; static inline void qphy_setbits(void __iomem *base, u32 offset, u32 val) @@ -2410,7 +2412,7 @@ static void phy_clk_release_provider(void *res) */ static int phy_pipe_clk_register(struct qmp_pcie *qmp, struct device_node *np) { - struct clk_fixed_rate *fixed; + struct clk_fixed_rate *fixed = &qmp->pipe_clk_fixed; struct clk_init_data init = { }; int ret; @@ -2420,10 +2422,6 @@ static int phy_pipe_clk_register(struct qmp_pcie *qmp, struct device_node *np) return ret; } - fixed = devm_kzalloc(qmp->dev, sizeof(*fixed), GFP_KERNEL); - if (!fixed) - return -ENOMEM; - init.ops = &clk_fixed_rate_ops; /*