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
This commit is contained in:
commit
6db174eaad
|
@ -5,13 +5,13 @@
|
||||||
|
|
||||||
# (M)HDRC = (Multipoint) Highspeed Dual-Role Controller
|
# (M)HDRC = (Multipoint) Highspeed Dual-Role Controller
|
||||||
config USB_MUSB_HDRC
|
config USB_MUSB_HDRC
|
||||||
|
tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)'
|
||||||
depends on USB && USB_GADGET
|
depends on USB && USB_GADGET
|
||||||
select NOP_USB_XCEIV if (ARCH_DAVINCI || MACH_OMAP3EVM || BLACKFIN)
|
select NOP_USB_XCEIV if (ARCH_DAVINCI || MACH_OMAP3EVM || BLACKFIN)
|
||||||
select TWL4030_USB if MACH_OMAP_3430SDP
|
select TWL4030_USB if MACH_OMAP_3430SDP
|
||||||
select TWL6030_USB if MACH_OMAP_4430SDP || MACH_OMAP4_PANDA
|
select TWL6030_USB if MACH_OMAP_4430SDP || MACH_OMAP4_PANDA
|
||||||
select USB_OTG_UTILS
|
select USB_OTG_UTILS
|
||||||
select USB_GADGET_DUALSPEED
|
select USB_GADGET_DUALSPEED
|
||||||
tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)'
|
|
||||||
help
|
help
|
||||||
Say Y here if your system has a dual role high speed USB
|
Say Y here if your system has a dual role high speed USB
|
||||||
controller based on the Mentor Graphics silicon IP. Then
|
controller based on the Mentor Graphics silicon IP. Then
|
||||||
|
@ -30,9 +30,10 @@ config USB_MUSB_HDRC
|
||||||
To compile this driver as a module, choose M here; the
|
To compile this driver as a module, choose M here; the
|
||||||
module will be called "musb-hdrc".
|
module will be called "musb-hdrc".
|
||||||
|
|
||||||
|
if USB_MUSB_HDRC
|
||||||
|
|
||||||
choice
|
choice
|
||||||
prompt "Platform Glue Layer"
|
prompt "Platform Glue Layer"
|
||||||
depends on USB_MUSB_HDRC
|
|
||||||
|
|
||||||
config USB_MUSB_DAVINCI
|
config USB_MUSB_DAVINCI
|
||||||
tristate "DaVinci"
|
tristate "DaVinci"
|
||||||
|
@ -77,28 +78,24 @@ choice
|
||||||
|
|
||||||
config USB_UX500_DMA
|
config USB_UX500_DMA
|
||||||
bool 'ST Ericsson U8500 and U5500'
|
bool 'ST Ericsson U8500 and U5500'
|
||||||
depends on USB_MUSB_HDRC
|
|
||||||
depends on USB_MUSB_UX500
|
depends on USB_MUSB_UX500
|
||||||
help
|
help
|
||||||
Enable DMA transfers on UX500 platforms.
|
Enable DMA transfers on UX500 platforms.
|
||||||
|
|
||||||
config USB_INVENTRA_DMA
|
config USB_INVENTRA_DMA
|
||||||
bool 'Inventra'
|
bool 'Inventra'
|
||||||
depends on USB_MUSB_HDRC
|
|
||||||
depends on USB_MUSB_OMAP2PLUS || USB_MUSB_BLACKFIN
|
depends on USB_MUSB_OMAP2PLUS || USB_MUSB_BLACKFIN
|
||||||
help
|
help
|
||||||
Enable DMA transfers using Mentor's engine.
|
Enable DMA transfers using Mentor's engine.
|
||||||
|
|
||||||
config USB_TI_CPPI_DMA
|
config USB_TI_CPPI_DMA
|
||||||
bool 'TI CPPI (Davinci)'
|
bool 'TI CPPI (Davinci)'
|
||||||
depends on USB_MUSB_HDRC
|
|
||||||
depends on USB_MUSB_DAVINCI
|
depends on USB_MUSB_DAVINCI
|
||||||
help
|
help
|
||||||
Enable DMA transfers when TI CPPI DMA is available.
|
Enable DMA transfers when TI CPPI DMA is available.
|
||||||
|
|
||||||
config USB_TUSB_OMAP_DMA
|
config USB_TUSB_OMAP_DMA
|
||||||
bool 'TUSB 6010'
|
bool 'TUSB 6010'
|
||||||
depends on USB_MUSB_HDRC
|
|
||||||
depends on USB_MUSB_TUSB6010
|
depends on USB_MUSB_TUSB6010
|
||||||
depends on ARCH_OMAP
|
depends on ARCH_OMAP
|
||||||
help
|
help
|
||||||
|
@ -106,7 +103,6 @@ config USB_TUSB_OMAP_DMA
|
||||||
|
|
||||||
config MUSB_PIO_ONLY
|
config MUSB_PIO_ONLY
|
||||||
bool 'Disable DMA (always use PIO)'
|
bool 'Disable DMA (always use PIO)'
|
||||||
depends on USB_MUSB_HDRC
|
|
||||||
help
|
help
|
||||||
All data is copied between memory and FIFO by the CPU.
|
All data is copied between memory and FIFO by the CPU.
|
||||||
DMA controllers are ignored.
|
DMA controllers are ignored.
|
||||||
|
@ -117,3 +113,5 @@ config MUSB_PIO_ONLY
|
||||||
parameter.
|
parameter.
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
|
endif # USB_MUSB_HDRC
|
||||||
|
|
|
@ -2012,8 +2012,6 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
|
||||||
if (status < 0)
|
if (status < 0)
|
||||||
goto fail3;
|
goto fail3;
|
||||||
|
|
||||||
pm_runtime_put(musb->controller);
|
|
||||||
|
|
||||||
status = musb_init_debugfs(musb);
|
status = musb_init_debugfs(musb);
|
||||||
if (status < 0)
|
if (status < 0)
|
||||||
goto fail4;
|
goto fail4;
|
||||||
|
|
|
@ -43,8 +43,8 @@
|
||||||
#define ERR(fmt, args...) yprintk(KERN_ERR, fmt, ## args)
|
#define ERR(fmt, args...) yprintk(KERN_ERR, fmt, ## args)
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_FS
|
#ifdef CONFIG_DEBUG_FS
|
||||||
extern int musb_init_debugfs(struct musb *musb);
|
int musb_init_debugfs(struct musb *musb);
|
||||||
extern void musb_exit_debugfs(struct musb *musb);
|
void musb_exit_debugfs(struct musb *musb);
|
||||||
#else
|
#else
|
||||||
static inline int musb_init_debugfs(struct musb *musb)
|
static inline int musb_init_debugfs(struct musb *musb)
|
||||||
{
|
{
|
||||||
|
|
|
@ -245,13 +245,7 @@ static void musb_otg_notifier_work(struct work_struct *data_notifier_work)
|
||||||
case USB_EVENT_ID:
|
case USB_EVENT_ID:
|
||||||
dev_dbg(musb->controller, "ID GND\n");
|
dev_dbg(musb->controller, "ID GND\n");
|
||||||
|
|
||||||
if (is_otg_enabled(musb)) {
|
if (!is_otg_enabled(musb) || musb->gadget_driver) {
|
||||||
if (musb->gadget_driver) {
|
|
||||||
pm_runtime_get_sync(musb->controller);
|
|
||||||
otg_init(musb->xceiv);
|
|
||||||
omap2430_musb_set_vbus(musb, 1);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
pm_runtime_get_sync(musb->controller);
|
pm_runtime_get_sync(musb->controller);
|
||||||
otg_init(musb->xceiv);
|
otg_init(musb->xceiv);
|
||||||
omap2430_musb_set_vbus(musb, 1);
|
omap2430_musb_set_vbus(musb, 1);
|
||||||
|
@ -342,7 +336,6 @@ static int omap2430_musb_init(struct musb *musb)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err1:
|
err1:
|
||||||
pm_runtime_disable(dev);
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -358,20 +351,19 @@ static void omap2430_musb_enable(struct musb *musb)
|
||||||
|
|
||||||
case USB_EVENT_ID:
|
case USB_EVENT_ID:
|
||||||
otg_init(musb->xceiv);
|
otg_init(musb->xceiv);
|
||||||
if (data->interface_type == MUSB_INTERFACE_UTMI) {
|
if (data->interface_type != MUSB_INTERFACE_UTMI)
|
||||||
devctl = musb_readb(musb->mregs, MUSB_DEVCTL);
|
break;
|
||||||
/* start the session */
|
devctl = musb_readb(musb->mregs, MUSB_DEVCTL);
|
||||||
devctl |= MUSB_DEVCTL_SESSION;
|
/* start the session */
|
||||||
musb_writeb(musb->mregs, MUSB_DEVCTL, devctl);
|
devctl |= MUSB_DEVCTL_SESSION;
|
||||||
while (musb_readb(musb->mregs, MUSB_DEVCTL) &
|
musb_writeb(musb->mregs, MUSB_DEVCTL, devctl);
|
||||||
MUSB_DEVCTL_BDEVICE) {
|
while (musb_readb(musb->mregs, MUSB_DEVCTL) &
|
||||||
cpu_relax();
|
MUSB_DEVCTL_BDEVICE) {
|
||||||
|
cpu_relax();
|
||||||
|
|
||||||
if (time_after(jiffies, timeout)) {
|
if (time_after(jiffies, timeout)) {
|
||||||
dev_err(musb->controller,
|
dev_err(dev, "configured as A device timeout");
|
||||||
"configured as A device timeout");
|
break;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -486,7 +478,6 @@ static int __exit omap2430_remove(struct platform_device *pdev)
|
||||||
platform_device_del(glue->musb);
|
platform_device_del(glue->musb);
|
||||||
platform_device_put(glue->musb);
|
platform_device_put(glue->musb);
|
||||||
pm_runtime_put(&pdev->dev);
|
pm_runtime_put(&pdev->dev);
|
||||||
pm_runtime_disable(&pdev->dev);
|
|
||||||
kfree(glue);
|
kfree(glue);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue