diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2011-12-22 16:59:53 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-12-22 16:59:59 -0500 |
commit | 6db174eaada4c2c426eca689ea871d9c0546f7a9 (patch) | |
tree | 5cca48ecd33ac158bfb47ad44618e87060a78fe3 /drivers/usb/musb | |
parent | 06e298b46417bc729b996396a068daf462e2ab62 (diff) | |
parent | b0945c07d9110a5b97a5495e26accdbe1d0d9277 (diff) |
Merge branch 'for-next/musb' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next
* 'for-next/musb' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb:
usb: musb: remove extern qualifier from musb_debug.h header
usb: musb: cleanup kconfig
usb: musb: trivial Kconfig cleanups
musb: omap2430: avoid pm_runtime_disable()
usb: musb: remove a bit of indentation
usb: musb: trivial cleanup
usb: musb: fix pm_runtime mismatch
Diffstat (limited to 'drivers/usb/musb')
-rw-r--r-- | drivers/usb/musb/Kconfig | 12 | ||||
-rw-r--r-- | drivers/usb/musb/musb_core.c | 2 | ||||
-rw-r--r-- | drivers/usb/musb/musb_debug.h | 4 | ||||
-rw-r--r-- | drivers/usb/musb/omap2430.c | 37 |
4 files changed, 21 insertions, 34 deletions
diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig index 84a022411e38..f70cab3beeec 100644 --- a/drivers/usb/musb/Kconfig +++ b/drivers/usb/musb/Kconfig | |||
@@ -5,13 +5,13 @@ | |||
5 | 5 | ||
6 | # (M)HDRC = (Multipoint) Highspeed Dual-Role Controller | 6 | # (M)HDRC = (Multipoint) Highspeed Dual-Role Controller |
7 | config USB_MUSB_HDRC | 7 | config USB_MUSB_HDRC |
8 | tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)' | ||
8 | depends on USB && USB_GADGET | 9 | depends on USB && USB_GADGET |
9 | select NOP_USB_XCEIV if (ARCH_DAVINCI || MACH_OMAP3EVM || BLACKFIN) | 10 | select NOP_USB_XCEIV if (ARCH_DAVINCI || MACH_OMAP3EVM || BLACKFIN) |
10 | select TWL4030_USB if MACH_OMAP_3430SDP | 11 | select TWL4030_USB if MACH_OMAP_3430SDP |
11 | select TWL6030_USB if MACH_OMAP_4430SDP || MACH_OMAP4_PANDA | 12 | select TWL6030_USB if MACH_OMAP_4430SDP || MACH_OMAP4_PANDA |
12 | select USB_OTG_UTILS | 13 | select USB_OTG_UTILS |
13 | select USB_GADGET_DUALSPEED | 14 | select USB_GADGET_DUALSPEED |
14 | tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)' | ||
15 | help | 15 | help |
16 | Say Y here if your system has a dual role high speed USB | 16 | Say Y here if your system has a dual role high speed USB |
17 | controller based on the Mentor Graphics silicon IP. Then | 17 | controller based on the Mentor Graphics silicon IP. Then |
@@ -30,9 +30,10 @@ config USB_MUSB_HDRC | |||
30 | To compile this driver as a module, choose M here; the | 30 | To compile this driver as a module, choose M here; the |
31 | module will be called "musb-hdrc". | 31 | module will be called "musb-hdrc". |
32 | 32 | ||
33 | if USB_MUSB_HDRC | ||
34 | |||
33 | choice | 35 | choice |
34 | prompt "Platform Glue Layer" | 36 | prompt "Platform Glue Layer" |
35 | depends on USB_MUSB_HDRC | ||
36 | 37 | ||
37 | config USB_MUSB_DAVINCI | 38 | config USB_MUSB_DAVINCI |
38 | tristate "DaVinci" | 39 | tristate "DaVinci" |
@@ -77,28 +78,24 @@ choice | |||
77 | 78 | ||
78 | config USB_UX500_DMA | 79 | config USB_UX500_DMA |
79 | bool 'ST Ericsson U8500 and U5500' | 80 | bool 'ST Ericsson U8500 and U5500' |
80 | depends on USB_MUSB_HDRC | ||
81 | depends on USB_MUSB_UX500 | 81 | depends on USB_MUSB_UX500 |
82 | help | 82 | help |
83 | Enable DMA transfers on UX500 platforms. | 83 | Enable DMA transfers on UX500 platforms. |
84 | 84 | ||
85 | config USB_INVENTRA_DMA | 85 | config USB_INVENTRA_DMA |
86 | bool 'Inventra' | 86 | bool 'Inventra' |
87 | depends on USB_MUSB_HDRC | ||
88 | depends on USB_MUSB_OMAP2PLUS || USB_MUSB_BLACKFIN | 87 | depends on USB_MUSB_OMAP2PLUS || USB_MUSB_BLACKFIN |
89 | help | 88 | help |
90 | Enable DMA transfers using Mentor's engine. | 89 | Enable DMA transfers using Mentor's engine. |
91 | 90 | ||
92 | config USB_TI_CPPI_DMA | 91 | config USB_TI_CPPI_DMA |
93 | bool 'TI CPPI (Davinci)' | 92 | bool 'TI CPPI (Davinci)' |
94 | depends on USB_MUSB_HDRC | ||
95 | depends on USB_MUSB_DAVINCI | 93 | depends on USB_MUSB_DAVINCI |
96 | help | 94 | help |
97 | Enable DMA transfers when TI CPPI DMA is available. | 95 | Enable DMA transfers when TI CPPI DMA is available. |
98 | 96 | ||
99 | config USB_TUSB_OMAP_DMA | 97 | config USB_TUSB_OMAP_DMA |
100 | bool 'TUSB 6010' | 98 | bool 'TUSB 6010' |
101 | depends on USB_MUSB_HDRC | ||
102 | depends on USB_MUSB_TUSB6010 | 99 | depends on USB_MUSB_TUSB6010 |
103 | depends on ARCH_OMAP | 100 | depends on ARCH_OMAP |
104 | help | 101 | help |
@@ -106,7 +103,6 @@ config USB_TUSB_OMAP_DMA | |||
106 | 103 | ||
107 | config MUSB_PIO_ONLY | 104 | config MUSB_PIO_ONLY |
108 | bool 'Disable DMA (always use PIO)' | 105 | bool 'Disable DMA (always use PIO)' |
109 | depends on USB_MUSB_HDRC | ||
110 | help | 106 | help |
111 | All data is copied between memory and FIFO by the CPU. | 107 | All data is copied between memory and FIFO by the CPU. |
112 | DMA controllers are ignored. | 108 | DMA controllers are ignored. |
@@ -117,3 +113,5 @@ config MUSB_PIO_ONLY | |||
117 | parameter. | 113 | parameter. |
118 | 114 | ||
119 | endchoice | 115 | endchoice |
116 | |||
117 | endif # USB_MUSB_HDRC | ||
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index de7405e6d7dc..f6ff7923048b 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -2012,8 +2012,6 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) | |||
2012 | if (status < 0) | 2012 | if (status < 0) |
2013 | goto fail3; | 2013 | goto fail3; |
2014 | 2014 | ||
2015 | pm_runtime_put(musb->controller); | ||
2016 | |||
2017 | status = musb_init_debugfs(musb); | 2015 | status = musb_init_debugfs(musb); |
2018 | if (status < 0) | 2016 | if (status < 0) |
2019 | goto fail4; | 2017 | goto fail4; |
diff --git a/drivers/usb/musb/musb_debug.h b/drivers/usb/musb/musb_debug.h index 742eada5002e..27ba8f799462 100644 --- a/drivers/usb/musb/musb_debug.h +++ b/drivers/usb/musb/musb_debug.h | |||
@@ -43,8 +43,8 @@ | |||
43 | #define ERR(fmt, args...) yprintk(KERN_ERR, fmt, ## args) | 43 | #define ERR(fmt, args...) yprintk(KERN_ERR, fmt, ## args) |
44 | 44 | ||
45 | #ifdef CONFIG_DEBUG_FS | 45 | #ifdef CONFIG_DEBUG_FS |
46 | extern int musb_init_debugfs(struct musb *musb); | 46 | int musb_init_debugfs(struct musb *musb); |
47 | extern void musb_exit_debugfs(struct musb *musb); | 47 | void musb_exit_debugfs(struct musb *musb); |
48 | #else | 48 | #else |
49 | static inline int musb_init_debugfs(struct musb *musb) | 49 | static inline int musb_init_debugfs(struct musb *musb) |
50 | { | 50 | { |
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index c24dc26b9be2..c27bbbf32b52 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c | |||
@@ -245,13 +245,7 @@ static void musb_otg_notifier_work(struct work_struct *data_notifier_work) | |||
245 | case USB_EVENT_ID: | 245 | case USB_EVENT_ID: |
246 | dev_dbg(musb->controller, "ID GND\n"); | 246 | dev_dbg(musb->controller, "ID GND\n"); |
247 | 247 | ||
248 | if (is_otg_enabled(musb)) { | 248 | if (!is_otg_enabled(musb) || musb->gadget_driver) { |
249 | if (musb->gadget_driver) { | ||
250 | pm_runtime_get_sync(musb->controller); | ||
251 | otg_init(musb->xceiv); | ||
252 | omap2430_musb_set_vbus(musb, 1); | ||
253 | } | ||
254 | } else { | ||
255 | pm_runtime_get_sync(musb->controller); | 249 | pm_runtime_get_sync(musb->controller); |
256 | otg_init(musb->xceiv); | 250 | otg_init(musb->xceiv); |
257 | omap2430_musb_set_vbus(musb, 1); | 251 | omap2430_musb_set_vbus(musb, 1); |
@@ -342,7 +336,6 @@ static int omap2430_musb_init(struct musb *musb) | |||
342 | return 0; | 336 | return 0; |
343 | 337 | ||
344 | err1: | 338 | err1: |
345 | pm_runtime_disable(dev); | ||
346 | return status; | 339 | return status; |
347 | } | 340 | } |
348 | 341 | ||
@@ -358,20 +351,19 @@ static void omap2430_musb_enable(struct musb *musb) | |||
358 | 351 | ||
359 | case USB_EVENT_ID: | 352 | case USB_EVENT_ID: |
360 | otg_init(musb->xceiv); | 353 | otg_init(musb->xceiv); |
361 | if (data->interface_type == MUSB_INTERFACE_UTMI) { | 354 | if (data->interface_type != MUSB_INTERFACE_UTMI) |
362 | devctl = musb_readb(musb->mregs, MUSB_DEVCTL); | 355 | break; |
363 | /* start the session */ | 356 | devctl = musb_readb(musb->mregs, MUSB_DEVCTL); |
364 | devctl |= MUSB_DEVCTL_SESSION; | 357 | /* start the session */ |
365 | musb_writeb(musb->mregs, MUSB_DEVCTL, devctl); | 358 | devctl |= MUSB_DEVCTL_SESSION; |
366 | while (musb_readb(musb->mregs, MUSB_DEVCTL) & | 359 | musb_writeb(musb->mregs, MUSB_DEVCTL, devctl); |
367 | MUSB_DEVCTL_BDEVICE) { | 360 | while (musb_readb(musb->mregs, MUSB_DEVCTL) & |
368 | cpu_relax(); | 361 | MUSB_DEVCTL_BDEVICE) { |
369 | 362 | cpu_relax(); | |
370 | if (time_after(jiffies, timeout)) { | 363 | |
371 | dev_err(musb->controller, | 364 | if (time_after(jiffies, timeout)) { |
372 | "configured as A device timeout"); | 365 | dev_err(dev, "configured as A device timeout"); |
373 | break; | 366 | break; |
374 | } | ||
375 | } | 367 | } |
376 | } | 368 | } |
377 | break; | 369 | break; |
@@ -486,7 +478,6 @@ static int __exit omap2430_remove(struct platform_device *pdev) | |||
486 | platform_device_del(glue->musb); | 478 | platform_device_del(glue->musb); |
487 | platform_device_put(glue->musb); | 479 | platform_device_put(glue->musb); |
488 | pm_runtime_put(&pdev->dev); | 480 | pm_runtime_put(&pdev->dev); |
489 | pm_runtime_disable(&pdev->dev); | ||
490 | kfree(glue); | 481 | kfree(glue); |
491 | 482 | ||
492 | return 0; | 483 | return 0; |