patch "usb: fsl_mxc_udc.c : Use clk_prepare_enable/clk_disable_unprepare" added to usb tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    usb: fsl_mxc_udc.c : Use clk_prepare_enable/clk_disable_unprepare

to my usb git tree which can be found at
    git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-next branch.

The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)

The patch will also be merged in the next major kernel release
during the merge window.

If you have any questions about this process, please let me know.


>From 1c7f6cd3f97b038e875094a8433e239f03d10955 Mon Sep 17 00:00:00 2001
From: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx>
Date: Fri, 25 May 2012 20:14:53 -0300
Subject: usb: fsl_mxc_udc.c : Use clk_prepare_enable/clk_disable_unprepare

Prepare the clock before enabling it.

Cc: <linux-usb@xxxxxxxxxxxxxxx>
Signed-off-by: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx>
Acked-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
Signed-off-by: Felipe Balbi <balbi@xxxxxx>
---
 drivers/usb/gadget/fsl_mxc_udc.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/gadget/fsl_mxc_udc.c b/drivers/usb/gadget/fsl_mxc_udc.c
index dcbc0a2..f4b5109 100644
--- a/drivers/usb/gadget/fsl_mxc_udc.c
+++ b/drivers/usb/gadget/fsl_mxc_udc.c
@@ -40,7 +40,7 @@ int fsl_udc_clk_init(struct platform_device *pdev)
 		if (IS_ERR(mxc_ahb_clk))
 			return PTR_ERR(mxc_ahb_clk);
 
-		ret = clk_enable(mxc_ahb_clk);
+		ret = clk_prepare_enable(mxc_ahb_clk);
 		if (ret < 0) {
 			dev_err(&pdev->dev, "clk_enable(\"usb_ahb\") failed\n");
 			goto eenahb;
@@ -65,7 +65,7 @@ int fsl_udc_clk_init(struct platform_device *pdev)
 		}
 	}
 
-	ret = clk_enable(mxc_usb_clk);
+	ret = clk_prepare_enable(mxc_usb_clk);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "clk_enable(\"usb_clk\") failed\n");
 		goto eenusb;
@@ -79,7 +79,7 @@ eclkrate:
 	mxc_usb_clk = NULL;
 egusb:
 	if (!cpu_is_mx35())
-		clk_disable(mxc_ahb_clk);
+		clk_disable_unprepare(mxc_ahb_clk);
 eenahb:
 	if (!cpu_is_mx35())
 		clk_put(mxc_ahb_clk);
@@ -104,7 +104,7 @@ void fsl_udc_clk_finalize(struct platform_device *pdev)
 
 	/* ULPI transceivers don't need usbpll */
 	if (pdata->phy_mode == FSL_USB2_PHY_ULPI) {
-		clk_disable(mxc_usb_clk);
+		clk_disable_unprepare(mxc_usb_clk);
 		clk_put(mxc_usb_clk);
 		mxc_usb_clk = NULL;
 	}
@@ -113,11 +113,11 @@ void fsl_udc_clk_finalize(struct platform_device *pdev)
 void fsl_udc_clk_release(void)
 {
 	if (mxc_usb_clk) {
-		clk_disable(mxc_usb_clk);
+		clk_disable_unprepare(mxc_usb_clk);
 		clk_put(mxc_usb_clk);
 	}
 	if (!cpu_is_mx35()) {
-		clk_disable(mxc_ahb_clk);
+		clk_disable_unprepare(mxc_ahb_clk);
 		clk_put(mxc_ahb_clk);
 	}
 }
-- 
1.7.10.1.362.g242cab3


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux