summaryrefslogtreecommitdiff
path: root/arch/arm/mach-mx5/usb_h1.c
diff options
context:
space:
mode:
authorIan Wisbon <ian.wisbon@timesys.com>2011-02-15 15:53:51 -0500
committerIan Wisbon <ian.wisbon@timesys.com>2011-02-15 15:53:51 -0500
commitdfdbf3f6e2d279f2a46ed95614cb4bf07657394d (patch)
tree2cc05669c5d3e47f7d4b28e31076b6dc6e771f36 /arch/arm/mach-mx5/usb_h1.c
parenteffff5718c380983788fe6c380671c18e15ac7c2 (diff)
Digi del-5.6 Complete2.6.31-digi-201102151558
Diffstat (limited to 'arch/arm/mach-mx5/usb_h1.c')
-rw-r--r--arch/arm/mach-mx5/usb_h1.c40
1 files changed, 29 insertions, 11 deletions
diff --git a/arch/arm/mach-mx5/usb_h1.c b/arch/arm/mach-mx5/usb_h1.c
index 7f0c463d45c1..52a2bcafd765 100644
--- a/arch/arm/mach-mx5/usb_h1.c
+++ b/arch/arm/mach-mx5/usb_h1.c
@@ -24,7 +24,6 @@
#include "iomux.h"
#include "mx51_pins.h"
-
/*
* USB Host1 HS port
*/
@@ -76,19 +75,25 @@ static void _wake_up_enable(struct fsl_usb2_platform_data *pdata, bool enable)
static void usbotg_clock_gate(bool on)
{
- struct clk *usboh3_clk = clk_get(NULL, "usboh3_clk");
- struct clk *usb_ahb_clk = clk_get(NULL, "usb_ahb_clk");
-
+ struct clk *usb_clk;
if (on) {
- clk_enable(usb_ahb_clk);
- clk_enable(usboh3_clk);
+ usb_clk = clk_get(NULL, "usb_ahb_clk");
+ clk_enable(usb_clk);
+ clk_put(usb_clk);
+
+ usb_clk = clk_get(NULL, "usboh3_clk");
+ clk_enable(usb_clk);
+ clk_put(usb_clk);
+
} else {
- clk_disable(usboh3_clk);
- clk_disable(usb_ahb_clk);
- }
+ usb_clk = clk_get(NULL, "usboh3_clk");
+ clk_disable(usb_clk);
+ clk_put(usb_clk);
- clk_put(usboh3_clk);
- clk_put(usb_ahb_clk);
+ usb_clk = clk_get(NULL, "usb_ahb_clk");
+ clk_disable(usb_clk);
+ clk_put(usb_clk);
+ }
}
static int fsl_usb_host_init_ext(struct platform_device *pdev)
@@ -109,6 +114,10 @@ static int fsl_usb_host_init_ext(struct platform_device *pdev)
usb_clk = clk_get(NULL, "usb_utmi_clk");
clk_disable(usb_clk);
clk_put(usb_clk);
+ } else if (cpu_is_mx50()) {
+ usb_clk = clk_get(&pdev->dev, "usb_phy2_clk");
+ clk_enable(usb_clk);
+ clk_put(usb_clk);
}
ret = fsl_usb_host_init(pdev);
@@ -143,7 +152,12 @@ static void fsl_usb_host_uninit_ext(struct fsl_usb2_platform_data *pdata)
usb_clk = clk_get(&pdata->pdev->dev, "usb_phy2_clk");
clk_disable(usb_clk);
clk_put(usb_clk);
+ } else if (cpu_is_mx50()) {
+ usb_clk = clk_get(&pdata->pdev->dev, "usb_phy2_clk");
+ clk_disable(usb_clk);
+ clk_put(usb_clk);
}
+
fsl_usb_host_uninit(pdata);
}
@@ -159,6 +173,10 @@ static struct fsl_usb2_platform_data usbh1_config = {
.transceiver = "utmi",
};
+void mx5_set_host1_vbus_func(driver_vbus_func driver_vbus)
+{
+ usbh1_config.platform_driver_vbus = driver_vbus;
+}
void __init mx5_usbh1_init(void)
{
if (cpu_is_mx51()) {