Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+20 -33
+5 -7
drivers/usb/musb/Kconfig
··· 5 5 6 6 # (M)HDRC = (Multipoint) Highspeed Dual-Role Controller 7 7 config USB_MUSB_HDRC 8 + tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)' 8 9 depends on USB && USB_GADGET 9 10 select NOP_USB_XCEIV if (ARCH_DAVINCI || MACH_OMAP3EVM || BLACKFIN) 10 11 select TWL4030_USB if MACH_OMAP_3430SDP 11 12 select TWL6030_USB if MACH_OMAP_4430SDP || MACH_OMAP4_PANDA 12 13 select USB_OTG_UTILS 13 14 select USB_GADGET_DUALSPEED 14 - tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)' 15 15 help 16 16 Say Y here if your system has a dual role high speed USB 17 17 controller based on the Mentor Graphics silicon IP. Then ··· 30 30 To compile this driver as a module, choose M here; the 31 31 module will be called "musb-hdrc". 32 32 33 + if USB_MUSB_HDRC 34 + 33 35 choice 34 36 prompt "Platform Glue Layer" 35 - depends on USB_MUSB_HDRC 36 37 37 38 config USB_MUSB_DAVINCI 38 39 tristate "DaVinci" ··· 78 77 79 78 config USB_UX500_DMA 80 79 bool 'ST Ericsson U8500 and U5500' 81 - depends on USB_MUSB_HDRC 82 80 depends on USB_MUSB_UX500 83 81 help 84 82 Enable DMA transfers on UX500 platforms. 85 83 86 84 config USB_INVENTRA_DMA 87 85 bool 'Inventra' 88 - depends on USB_MUSB_HDRC 89 86 depends on USB_MUSB_OMAP2PLUS || USB_MUSB_BLACKFIN 90 87 help 91 88 Enable DMA transfers using Mentor's engine. 92 89 93 90 config USB_TI_CPPI_DMA 94 91 bool 'TI CPPI (Davinci)' 95 - depends on USB_MUSB_HDRC 96 92 depends on USB_MUSB_DAVINCI 97 93 help 98 94 Enable DMA transfers when TI CPPI DMA is available. 99 95 100 96 config USB_TUSB_OMAP_DMA 101 97 bool 'TUSB 6010' 102 - depends on USB_MUSB_HDRC 103 98 depends on USB_MUSB_TUSB6010 104 99 depends on ARCH_OMAP 105 100 help ··· 103 106 104 107 config MUSB_PIO_ONLY 105 108 bool 'Disable DMA (always use PIO)' 106 - depends on USB_MUSB_HDRC 107 109 help 108 110 All data is copied between memory and FIFO by the CPU. 109 111 DMA controllers are ignored. ··· 113 117 parameter. 114 118 115 119 endchoice 120 + 121 + endif # USB_MUSB_HDRC
-2
drivers/usb/musb/musb_core.c
··· 2012 2012 if (status < 0) 2013 2013 goto fail3; 2014 2014 2015 - pm_runtime_put(musb->controller); 2016 - 2017 2015 status = musb_init_debugfs(musb); 2018 2016 if (status < 0) 2019 2017 goto fail4;
+2 -2
drivers/usb/musb/musb_debug.h
··· 43 43 #define ERR(fmt, args...) yprintk(KERN_ERR, fmt, ## args) 44 44 45 45 #ifdef CONFIG_DEBUG_FS 46 - extern int musb_init_debugfs(struct musb *musb); 47 - extern void musb_exit_debugfs(struct musb *musb); 46 + int musb_init_debugfs(struct musb *musb); 47 + void musb_exit_debugfs(struct musb *musb); 48 48 #else 49 49 static inline int musb_init_debugfs(struct musb *musb) 50 50 {
+13 -22
drivers/usb/musb/omap2430.c
··· 245 245 case USB_EVENT_ID: 246 246 dev_dbg(musb->controller, "ID GND\n"); 247 247 248 - if (is_otg_enabled(musb)) { 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 { 248 + if (!is_otg_enabled(musb) || musb->gadget_driver) { 255 249 pm_runtime_get_sync(musb->controller); 256 250 otg_init(musb->xceiv); 257 251 omap2430_musb_set_vbus(musb, 1); ··· 336 342 return 0; 337 343 338 344 err1: 339 - pm_runtime_disable(dev); 340 345 return status; 341 346 } 342 347 ··· 351 358 352 359 case USB_EVENT_ID: 353 360 otg_init(musb->xceiv); 354 - if (data->interface_type == MUSB_INTERFACE_UTMI) { 355 - devctl = musb_readb(musb->mregs, MUSB_DEVCTL); 356 - /* start the session */ 357 - devctl |= MUSB_DEVCTL_SESSION; 358 - musb_writeb(musb->mregs, MUSB_DEVCTL, devctl); 359 - while (musb_readb(musb->mregs, MUSB_DEVCTL) & 360 - MUSB_DEVCTL_BDEVICE) { 361 - cpu_relax(); 361 + if (data->interface_type != MUSB_INTERFACE_UTMI) 362 + break; 363 + devctl = musb_readb(musb->mregs, MUSB_DEVCTL); 364 + /* start the session */ 365 + devctl |= MUSB_DEVCTL_SESSION; 366 + musb_writeb(musb->mregs, MUSB_DEVCTL, devctl); 367 + while (musb_readb(musb->mregs, MUSB_DEVCTL) & 368 + MUSB_DEVCTL_BDEVICE) { 369 + cpu_relax(); 362 370 363 - if (time_after(jiffies, timeout)) { 364 - dev_err(musb->controller, 365 - "configured as A device timeout"); 366 - break; 367 - } 371 + if (time_after(jiffies, timeout)) { 372 + dev_err(dev, "configured as A device timeout"); 373 + break; 368 374 } 369 375 } 370 376 break; ··· 478 486 platform_device_del(glue->musb); 479 487 platform_device_put(glue->musb); 480 488 pm_runtime_put(&pdev->dev); 481 - pm_runtime_disable(&pdev->dev); 482 489 kfree(glue); 483 490 484 491 return 0;