Hello all, After this merge window, musb will be working differently. I dropped all that ifdeferry around the code which was selecting the mode of operation between OTG, peripheral and host. Now the driver will always be compiled with OTG support. This will allow us to find more bugs on the driver and decrease the amount of possible Kconfig errors. Also, musb can now be compile as a module, together with all the glue layers (well, they still depend on the architecture). Also, we will be able to run musb together with another UDC e.g. dummy_hcd: # lsmod Module Size Used by g_ether 36103 0 dummy_hcd 21509 0 g_zero 25694 0 musb_hdrc 46549 0 udc_core 6446 4 g_ether,dummy_hcd,g_zero,musb_hdrc omap2430 3960 0 usbcore 176118 4 dummy_hcd,musb_hdrc,omap2430 twl6030_usb 4522 0 This is thanks to the udc class which I started and Sebastian (thanks dude) finished it up. There's only one minor regression which we _must_ fix during the next -rc cycle. Because I, now, allow glue layers to be built as modules, the old: #ifdef CONFIG_USB_MUSB_MY_GLUE_LAYER fifo_mode = my_great_number #endif does not work anymore. It's now always defaulting to 2. So, for a while we will *have to* remember to pass the correct parameter. Before anyone tries, I will not accept the below: diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 9c44b7c..ad88bfa 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -1009,10 +1009,15 @@ static void musb_shutdown(struct platform_device *pdev) * We don't currently use dynamic fifo setup capability to do anything * more than selecting one of a bunch of predefined configurations. */ -#if defined(CONFIG_USB_MUSB_TUSB6010) || defined(CONFIG_USB_MUSB_OMAP2PLUS) \ - || defined(CONFIG_USB_MUSB_AM35X) +#if defined(CONFIG_USB_MUSB_TUSB6010) \ + || defined(CONFIG_USB_MUSB_TUSB6010_MODULE) \ + || defined(CONFIG_USB_MUSB_OMAP2PLUS) \ + || defined(CONFIG_USB_MUSB_OMAP2PLUS_MODULE) \ + || defined(CONFIG_USB_MUSB_AM35X) \ + || defined(CONFIG_USB_MUSB_AM35X_MODULE) static ushort __initdata fifo_mode = 4; -#elif defined(CONFIG_USB_MUSB_UX500) +#elif defined(CONFIG_USB_MUSB_UX500) \ + defined(CONFIG_USB_MUSB_UX500_MODULE) static ushort __initdata fifo_mode = 5; #else static ushort __initdata fifo_mode = 2; that's broken and _has_ to vanish. We need to find another way to decide which fifo mode to use by default, or find a way to actually use fifo_mode based on amount of RAM left and usb_ep_enable(). I would be very happy to defer fifo allocation until we know which endpoints gadget driver will be using, if they try to use too much, we just fail them, that's how this thing should've been done anyway. If you want to see how things are going to be, take a look at my 'gadget' branch [1] to which I just pushed the latest changes that where now tested on pandaboard (it might take a while until kernel.org replicates everything through all the servers). Anyway, that's all. Happy hacking. [1] http://git.kernel.org/?p=linux/kernel/git/balbi/usb.git;a=shortlog;h=refs/heads/gadget -- balbi
Attachment:
signature.asc
Description: Digital signature