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