From: Al Cooper <alcooperx@gmail.com> To: linux-kernel@vger.kernel.org Cc: Al Cooper <alcooperx@gmail.com>, bcm-kernel-feedback-list@broadcom.com, devicetree@vger.kernel.org, Florian Fainelli <f.fainelli@gmail.com>, Kishon Vijay Abraham I <kishon@ti.com>, linux-arm-kernel@lists.infradead.org, Mark Rutland <mark.rutland@arm.com>, Rob Herring <robh+dt@kernel.org>, Srinath Mannam <srinath.mannam@broadcom.com> Subject: [PATCH v3 02/13] phy: usb: Get all drivers that use USB clks using correct enable/disable Date: Tue, 10 Dec 2019 08:21:21 -0500 [thread overview] Message-ID: <20191210132132.41509-3-alcooperx@gmail.com> (raw) In-Reply-To: <20191210132132.41509-1-alcooperx@gmail.com> The BRCM USB Phy, ohci, ehci and xhci drivers all use the USB clocks but not all drivers use the clk_prepare_enable/clk_disable_unprepare versions to enable/disable the clocks. This change gets all drivers using the prepare version. Signed-off-by: Al Cooper <alcooperx@gmail.com> --- drivers/phy/broadcom/phy-brcm-usb.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/phy/broadcom/phy-brcm-usb.c b/drivers/phy/broadcom/phy-brcm-usb.c index f5c1f2983a1d..217e3702ef4e 100644 --- a/drivers/phy/broadcom/phy-brcm-usb.c +++ b/drivers/phy/broadcom/phy-brcm-usb.c @@ -74,8 +74,8 @@ static int brcm_usb_phy_init(struct phy *gphy) */ mutex_lock(&priv->mutex); if (priv->init_count++ == 0) { - clk_enable(priv->usb_20_clk); - clk_enable(priv->usb_30_clk); + clk_prepare_enable(priv->usb_20_clk); + clk_prepare_enable(priv->usb_30_clk); brcm_usb_init_common(&priv->ini); } mutex_unlock(&priv->mutex); @@ -106,8 +106,8 @@ static int brcm_usb_phy_exit(struct phy *gphy) mutex_lock(&priv->mutex); if (--priv->init_count == 0) { brcm_usb_uninit_common(&priv->ini); - clk_disable(priv->usb_20_clk); - clk_disable(priv->usb_30_clk); + clk_disable_unprepare(priv->usb_20_clk); + clk_disable_unprepare(priv->usb_30_clk); } mutex_unlock(&priv->mutex); phy->inited = false; @@ -360,8 +360,8 @@ static int brcm_usb_phy_probe(struct platform_device *pdev) if (priv->has_eohci) brcm_usb_uninit_eohci(&priv->ini); brcm_usb_uninit_common(&priv->ini); - clk_disable(priv->usb_20_clk); - clk_disable(priv->usb_30_clk); + clk_disable_unprepare(priv->usb_20_clk); + clk_disable_unprepare(priv->usb_30_clk); phy_provider = devm_of_phy_provider_register(dev, brcm_usb_phy_xlate); @@ -381,8 +381,8 @@ static int brcm_usb_phy_suspend(struct device *dev) struct brcm_usb_phy_data *priv = dev_get_drvdata(dev); if (priv->init_count) { - clk_disable(priv->usb_20_clk); - clk_disable(priv->usb_30_clk); + clk_disable_unprepare(priv->usb_20_clk); + clk_disable_unprepare(priv->usb_30_clk); } return 0; } @@ -391,8 +391,8 @@ static int brcm_usb_phy_resume(struct device *dev) { struct brcm_usb_phy_data *priv = dev_get_drvdata(dev); - clk_enable(priv->usb_20_clk); - clk_enable(priv->usb_30_clk); + clk_prepare_enable(priv->usb_20_clk); + clk_prepare_enable(priv->usb_30_clk); brcm_usb_init_ipp(&priv->ini); /* @@ -405,13 +405,13 @@ static int brcm_usb_phy_resume(struct device *dev) brcm_usb_init_eohci(&priv->ini); } else if (priv->has_eohci) { brcm_usb_uninit_eohci(&priv->ini); - clk_disable(priv->usb_20_clk); + clk_disable_unprepare(priv->usb_20_clk); } if (priv->phys[BRCM_USB_PHY_3_0].inited) { brcm_usb_init_xhci(&priv->ini); } else if (priv->has_xhci) { brcm_usb_uninit_xhci(&priv->ini); - clk_disable(priv->usb_30_clk); + clk_disable_unprepare(priv->usb_30_clk); } } else { if (priv->has_xhci) @@ -419,8 +419,8 @@ static int brcm_usb_phy_resume(struct device *dev) if (priv->has_eohci) brcm_usb_uninit_eohci(&priv->ini); brcm_usb_uninit_common(&priv->ini); - clk_disable(priv->usb_20_clk); - clk_disable(priv->usb_30_clk); + clk_disable_unprepare(priv->usb_20_clk); + clk_disable_unprepare(priv->usb_30_clk); } return 0; -- 2.17.1
WARNING: multiple messages have this Message-ID (diff)
From: Al Cooper <alcooperx@gmail.com> To: linux-kernel@vger.kernel.org Cc: Mark Rutland <mark.rutland@arm.com>, devicetree@vger.kernel.org, Florian Fainelli <f.fainelli@gmail.com>, Al Cooper <alcooperx@gmail.com>, Kishon Vijay Abraham I <kishon@ti.com>, Rob Herring <robh+dt@kernel.org>, bcm-kernel-feedback-list@broadcom.com, Srinath Mannam <srinath.mannam@broadcom.com>, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 02/13] phy: usb: Get all drivers that use USB clks using correct enable/disable Date: Tue, 10 Dec 2019 08:21:21 -0500 [thread overview] Message-ID: <20191210132132.41509-3-alcooperx@gmail.com> (raw) In-Reply-To: <20191210132132.41509-1-alcooperx@gmail.com> The BRCM USB Phy, ohci, ehci and xhci drivers all use the USB clocks but not all drivers use the clk_prepare_enable/clk_disable_unprepare versions to enable/disable the clocks. This change gets all drivers using the prepare version. Signed-off-by: Al Cooper <alcooperx@gmail.com> --- drivers/phy/broadcom/phy-brcm-usb.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/phy/broadcom/phy-brcm-usb.c b/drivers/phy/broadcom/phy-brcm-usb.c index f5c1f2983a1d..217e3702ef4e 100644 --- a/drivers/phy/broadcom/phy-brcm-usb.c +++ b/drivers/phy/broadcom/phy-brcm-usb.c @@ -74,8 +74,8 @@ static int brcm_usb_phy_init(struct phy *gphy) */ mutex_lock(&priv->mutex); if (priv->init_count++ == 0) { - clk_enable(priv->usb_20_clk); - clk_enable(priv->usb_30_clk); + clk_prepare_enable(priv->usb_20_clk); + clk_prepare_enable(priv->usb_30_clk); brcm_usb_init_common(&priv->ini); } mutex_unlock(&priv->mutex); @@ -106,8 +106,8 @@ static int brcm_usb_phy_exit(struct phy *gphy) mutex_lock(&priv->mutex); if (--priv->init_count == 0) { brcm_usb_uninit_common(&priv->ini); - clk_disable(priv->usb_20_clk); - clk_disable(priv->usb_30_clk); + clk_disable_unprepare(priv->usb_20_clk); + clk_disable_unprepare(priv->usb_30_clk); } mutex_unlock(&priv->mutex); phy->inited = false; @@ -360,8 +360,8 @@ static int brcm_usb_phy_probe(struct platform_device *pdev) if (priv->has_eohci) brcm_usb_uninit_eohci(&priv->ini); brcm_usb_uninit_common(&priv->ini); - clk_disable(priv->usb_20_clk); - clk_disable(priv->usb_30_clk); + clk_disable_unprepare(priv->usb_20_clk); + clk_disable_unprepare(priv->usb_30_clk); phy_provider = devm_of_phy_provider_register(dev, brcm_usb_phy_xlate); @@ -381,8 +381,8 @@ static int brcm_usb_phy_suspend(struct device *dev) struct brcm_usb_phy_data *priv = dev_get_drvdata(dev); if (priv->init_count) { - clk_disable(priv->usb_20_clk); - clk_disable(priv->usb_30_clk); + clk_disable_unprepare(priv->usb_20_clk); + clk_disable_unprepare(priv->usb_30_clk); } return 0; } @@ -391,8 +391,8 @@ static int brcm_usb_phy_resume(struct device *dev) { struct brcm_usb_phy_data *priv = dev_get_drvdata(dev); - clk_enable(priv->usb_20_clk); - clk_enable(priv->usb_30_clk); + clk_prepare_enable(priv->usb_20_clk); + clk_prepare_enable(priv->usb_30_clk); brcm_usb_init_ipp(&priv->ini); /* @@ -405,13 +405,13 @@ static int brcm_usb_phy_resume(struct device *dev) brcm_usb_init_eohci(&priv->ini); } else if (priv->has_eohci) { brcm_usb_uninit_eohci(&priv->ini); - clk_disable(priv->usb_20_clk); + clk_disable_unprepare(priv->usb_20_clk); } if (priv->phys[BRCM_USB_PHY_3_0].inited) { brcm_usb_init_xhci(&priv->ini); } else if (priv->has_xhci) { brcm_usb_uninit_xhci(&priv->ini); - clk_disable(priv->usb_30_clk); + clk_disable_unprepare(priv->usb_30_clk); } } else { if (priv->has_xhci) @@ -419,8 +419,8 @@ static int brcm_usb_phy_resume(struct device *dev) if (priv->has_eohci) brcm_usb_uninit_eohci(&priv->ini); brcm_usb_uninit_common(&priv->ini); - clk_disable(priv->usb_20_clk); - clk_disable(priv->usb_30_clk); + clk_disable_unprepare(priv->usb_20_clk); + clk_disable_unprepare(priv->usb_30_clk); } return 0; -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-12-10 13:23 UTC|newest] Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-12-10 13:21 [PATCH v3 00/13] phy: usb: Updates to Broadcom STB USB PHY driver Al Cooper 2019-12-10 13:21 ` Al Cooper 2019-12-10 13:21 ` [PATCH v3 01/13] phy: usb: EHCI DMA may lose a burst of DMA data for 7255xA0 family Al Cooper 2019-12-10 13:21 ` Al Cooper 2019-12-10 13:21 ` Al Cooper [this message] 2019-12-10 13:21 ` [PATCH v3 02/13] phy: usb: Get all drivers that use USB clks using correct enable/disable Al Cooper 2019-12-10 13:21 ` [PATCH v3 03/13] phy: usb: Put USB phys into IDDQ on suspend to save power in S2 mode Al Cooper 2019-12-10 13:21 ` Al Cooper 2019-12-10 13:21 ` [PATCH v3 04/13] phy: usb: Add "wake on" functionality Al Cooper 2019-12-10 13:21 ` Al Cooper 2019-12-10 13:21 ` [PATCH v3 05/13] phy: usb: Restructure in preparation for adding 7216 USB support Al Cooper 2019-12-10 13:21 ` Al Cooper 2019-12-10 13:21 ` [PATCH v3 06/13] dt-bindings: Add Broadcom STB USB PHY binding document Al Cooper 2019-12-10 13:21 ` Al Cooper 2019-12-13 19:10 ` Rob Herring 2019-12-13 19:10 ` Rob Herring 2019-12-10 13:21 ` [PATCH v3 07/13] phy: usb: Add support for new Synopsis USB controller on the 7216 Al Cooper 2019-12-10 13:21 ` Al Cooper 2020-01-03 9:33 ` Kishon Vijay Abraham I 2020-01-03 9:33 ` Kishon Vijay Abraham I 2020-01-03 13:06 ` Alan Cooper 2020-01-03 13:06 ` Alan Cooper 2019-12-10 13:21 ` [PATCH v3 08/13] phy: usb: Add support for new Synopsis USB controller on the 7211b0 Al Cooper 2019-12-10 13:21 ` Al Cooper 2019-12-10 13:21 ` [PATCH v3 09/13] phy: usb: fix driver to defer on clk_get defer Al Cooper 2019-12-10 13:21 ` Al Cooper 2019-12-10 13:21 ` [PATCH v3 10/13] phy: usb: PHY's MDIO registers not accessible without device installed Al Cooper 2019-12-10 13:21 ` Al Cooper 2019-12-10 13:21 ` [PATCH v3 11/13] phy: usb: bdc: Fix occasional failure with BDC on 7211 Al Cooper 2019-12-10 13:21 ` Al Cooper 2019-12-10 13:21 ` [PATCH v3 12/13] phy: usb: USB driver is crashing during S3 resume on 7216 Al Cooper 2019-12-10 13:21 ` Al Cooper 2019-12-10 13:21 ` [PATCH v3 13/13] phy: usb: Add support for wake and USB low power mode for 7211 S2/S5 Al Cooper 2019-12-10 13:21 ` Al Cooper 2019-12-13 19:25 ` [PATCH v3 00/13] phy: usb: Updates to Broadcom STB USB PHY driver Florian Fainelli 2019-12-13 19:25 ` Florian Fainelli 2019-12-31 17:41 ` Florian Fainelli 2019-12-31 17:41 ` Florian Fainelli
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20191210132132.41509-3-alcooperx@gmail.com \ --to=alcooperx@gmail.com \ --cc=bcm-kernel-feedback-list@broadcom.com \ --cc=devicetree@vger.kernel.org \ --cc=f.fainelli@gmail.com \ --cc=kishon@ti.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=mark.rutland@arm.com \ --cc=robh+dt@kernel.org \ --cc=srinath.mannam@broadcom.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.