[PATCH] USB: ehci: ohci: Add clk_{un}prepare() support

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

 



clk_{un}prepare is mandatory for platforms using common clock framework. Since
these drivers are used by SPEAr platform, which supports common clock framework,
add clk_{un}prepare() support for them.

Signed-off-by: Viresh Kumar <viresh.kumar@xxxxxx>
---
 drivers/usb/host/ehci-spear.c |    2 ++
 drivers/usb/host/ohci-spear.c |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/host/ehci-spear.c b/drivers/usb/host/ehci-spear.c
index 2e3c89a..32a1ea2 100644
--- a/drivers/usb/host/ehci-spear.c
+++ b/drivers/usb/host/ehci-spear.c
@@ -26,12 +26,14 @@ struct spear_ehci {
 
 static void spear_start_ehci(struct spear_ehci *ehci)
 {
+	clk_prepare(ehci->clk);
 	clk_enable(ehci->clk);
 }
 
 static void spear_stop_ehci(struct spear_ehci *ehci)
 {
 	clk_disable(ehci->clk);
+	clk_unprepare(ehci->clk);
 }
 
 static int ehci_spear_setup(struct usb_hcd *hcd)
diff --git a/drivers/usb/host/ohci-spear.c b/drivers/usb/host/ohci-spear.c
index eb4640b..d968e6f 100644
--- a/drivers/usb/host/ohci-spear.c
+++ b/drivers/usb/host/ohci-spear.c
@@ -25,12 +25,14 @@ struct spear_ohci {
 
 static void spear_start_ohci(struct spear_ohci *ohci)
 {
+	clk_prepare(ohci->clk);
 	clk_enable(ohci->clk);
 }
 
 static void spear_stop_ohci(struct spear_ohci *ohci)
 {
 	clk_disable(ohci->clk);
+	clk_unprepare(ohci->clk);
 }
 
 static int __devinit ohci_spear_start(struct usb_hcd *hcd)
-- 
1.7.9

--
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