aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/omap_udc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/omap_udc.c')
-rw-r--r--drivers/usb/gadget/omap_udc.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c
index b836efe9ea71..f81e4f025f23 100644
--- a/drivers/usb/gadget/omap_udc.c
+++ b/drivers/usb/gadget/omap_udc.c
@@ -2098,6 +2098,7 @@ static inline int machine_without_vbus_sense(void)
2098 || machine_is_omap_h4() 2098 || machine_is_omap_h4()
2099#endif 2099#endif
2100 || machine_is_sx1() 2100 || machine_is_sx1()
2101 || cpu_is_omap7xx() /* No known omap7xx boards with vbus sense */
2101 ); 2102 );
2102} 2103}
2103 2104
@@ -2838,6 +2839,16 @@ static int __init omap_udc_probe(struct platform_device *pdev)
2838 udelay(100); 2839 udelay(100);
2839 } 2840 }
2840 2841
2842 if (cpu_is_omap7xx()) {
2843 dc_clk = clk_get(&pdev->dev, "usb_dc_ck");
2844 hhc_clk = clk_get(&pdev->dev, "l3_ocpi_ck");
2845 BUG_ON(IS_ERR(dc_clk) || IS_ERR(hhc_clk));
2846 /* can't use omap_udc_enable_clock yet */
2847 clk_enable(dc_clk);
2848 clk_enable(hhc_clk);
2849 udelay(100);
2850 }
2851
2841 INFO("OMAP UDC rev %d.%d%s\n", 2852 INFO("OMAP UDC rev %d.%d%s\n",
2842 omap_readw(UDC_REV) >> 4, omap_readw(UDC_REV) & 0xf, 2853 omap_readw(UDC_REV) >> 4, omap_readw(UDC_REV) & 0xf,
2843 config->otg ? ", Mini-AB" : ""); 2854 config->otg ? ", Mini-AB" : "");
@@ -2970,7 +2981,7 @@ known:
2970 goto cleanup3; 2981 goto cleanup3;
2971 } 2982 }
2972#endif 2983#endif
2973 if (cpu_is_omap16xx()) { 2984 if (cpu_is_omap16xx() || cpu_is_omap7xx()) {
2974 udc->dc_clk = dc_clk; 2985 udc->dc_clk = dc_clk;
2975 udc->hhc_clk = hhc_clk; 2986 udc->hhc_clk = hhc_clk;
2976 clk_disable(hhc_clk); 2987 clk_disable(hhc_clk);
@@ -3008,7 +3019,7 @@ cleanup0:
3008 if (xceiv) 3019 if (xceiv)
3009 otg_put_transceiver(xceiv); 3020 otg_put_transceiver(xceiv);
3010 3021
3011 if (cpu_is_omap16xx() || cpu_is_omap24xx()) { 3022 if (cpu_is_omap16xx() || cpu_is_omap24xx() || cpu_is_omap7xx()) {
3012 clk_disable(hhc_clk); 3023 clk_disable(hhc_clk);
3013 clk_disable(dc_clk); 3024 clk_disable(dc_clk);
3014 clk_put(hhc_clk); 3025 clk_put(hhc_clk);
@@ -3115,6 +3126,10 @@ static struct platform_driver udc_driver = {
3115 3126
3116static int __init udc_init(void) 3127static int __init udc_init(void)
3117{ 3128{
3129 /* Disable DMA for omap7xx -- it doesn't work right. */
3130 if (cpu_is_omap7xx())
3131 use_dma = 0;
3132
3118 INFO("%s, version: " DRIVER_VERSION 3133 INFO("%s, version: " DRIVER_VERSION
3119#ifdef USE_ISO 3134#ifdef USE_ISO
3120 " (iso)" 3135 " (iso)"