Re: [U-Boot] [RFC PATCH v3 0/13] Port of MUSB driver from Linux (changes from Linux)
Hi Tom, On Tue, Oct 23, 2012 at 1:45 AM, Tom Rini tr...@ti.com wrote: In general, things look OK but please run it through checkpatch.pl, use just one Signed-off-by line and fixup if (...) { ... one line ... } in the glue code you add that's not synced up from the kernel (I saw one in the am335x bits). Thanks! And lets move this out of RFC... Hm.. checkpatch produces tons of messages (mostly over 80 character lines) but I can't see anything about if ( ... ) { one-line } in the code I've added by hand... I've fixed some other minor style problems in the code that was not taken from the kernel directly. Regards, Ilya. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v3 0/13] Port of MUSB driver from Linux (changes from Linux)
Hi Tom, On Tue, Oct 23, 2012 at 1:45 AM, Tom Rini tr...@ti.com wrote: This is not a replacement for existing MUSB driver (at least for now), cause there are still consumers of USB serial gadget which uses old API and there is no support for serial with new API for now. I'm a little lost. In the kernel, you can't use CONFIG_USB_G_SERIAL with CONFIG_USB_MUSB_${hw glue} ? You can. But we don't have g_serial in U-Boot yet. In general, things look OK but please run it through checkpatch.pl, use just one Signed-off-by line and fixup if (...) { ... one line ... } in the glue code you add that's not synced up from the kernel (I saw one in the am335x bits). Thanks! And lets move this out of RFC... Ok. Regards, Ilya. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v3 0/13] Port of MUSB driver from Linux (changes from Linux)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/24/12 01:42, Ilya Yanok wrote: Hi Tom, On Tue, Oct 23, 2012 at 1:45 AM, Tom Rini tr...@ti.com mailto:tr...@ti.com wrote: This is not a replacement for existing MUSB driver (at least for now), cause there are still consumers of USB serial gadget which uses old API and there is no support for serial with new API for now. I'm a little lost. In the kernel, you can't use CONFIG_USB_G_SERIAL with CONFIG_USB_MUSB_${hw glue} ? You can. But we don't have g_serial in U-Boot yet. So we would need to port that, in order to remove the serial gadget we have, and drop the previous musb core? - -- Tom -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQIcBAEBAgAGBQJQh/obAAoJENk4IS6UOR1WCIMQAJgsWQ9TxeklFiavkFZKEXh2 BnKklSOjzuJd3+Wz0WXqBpcRYa2hl3UviG84ZUyjfAcZnFj+zn1xhfDRVmvCzARe JXOOZuoWJdVDRNUVHzsOpKqzdRIqwkYnOJQuj9HAmnXrnr6sqLDCs1/hM0raNC+5 Ry0S1Fi0kA6DfwTSSPba8aTMqPAFWS5SMiJzrdx7BjNVw8Roq5v/NPJO2A/Jsrfj rLgI++JzyY+UYilJI58+zyPcjg213/Tnx8eJq+my8nW9w2Z13A9Xa76DCAnBfqPy ndwe29Lqa8sfz1/MFkl1v4vIYOTtIDnfr4siOkKfIbwBCh6/a0VfDOiYbOi0YdLs 0nPlowC4Z2dYJezEk4kCA1ano8SZucg5QtDwh491SO2vIcZ6HplOgpWDIamu/bxt 79VpDRU/nBKWseB3gESPBhYSt31OA+FH00plsYJFM3PocjuCc4SMvXQP6MWxC2rJ KzOv/cUGzxDHTA4a+xkq3F315v8Ib7De0XK/cgmGxiba53v/BHaST/qu5TOcABG+ Wp0qpAn0OcEjAXPVJk6cGIcBKj/ahgxbGtly6aDSgxipRQo75rBGmlTfpz0IZ/Ie Tdz/VJRhX818Ce2suZeqShN/zhWwkzCliXqMi43aUsq3YTOCDbrRMNxiWpnP7VJZ EJFQQhcuUe732txbvfjW =RRrb -END PGP SIGNATURE- ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v3 0/13] Port of MUSB driver from Linux (changes from Linux)
Hi Tom, On Wed, Oct 24, 2012 at 4:24 PM, Tom Rini tr...@ti.com wrote: I'm a little lost. In the kernel, you can't use CONFIG_USB_G_SERIAL with CONFIG_USB_MUSB_${hw glue} ? You can. But we don't have g_serial in U-Boot yet. So we would need to port that, in order to remove the serial gadget we have, and drop the previous musb core? Yes, we need to port g_serial, but removing the old usbtty driver is probably too harsh: this will render a bunch of old udc driver (not only old MUSB code) not useful for anything. Regards, Ilya. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v3 0/13] Port of MUSB driver from Linux (changes from Linux)
Dear Ilya Yanok, [...] Ok, I applied them all and pushed to u-boot-usb / master ... can you test the branch and see if it works? Tom, can you check it too please? Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v3 0/13] Port of MUSB driver from Linux (changes from Linux)
On Thu, Oct 18, 2012 at 10:51:47PM +0400, Ilya Yanok wrote: Current MUSB driver in U-Boot uses old UDC API while new gagdet client drivers need new gadget API. Also current MUSB driver has some significant limitations (like inability to handle tx for endpoints other than ep0). So I think port of new Linux driver is desirable. This is initial port, performed mostly by putting DM and OTG code under #ifndef __UBOOT__ clauses. My intention was to be as close as possible to the original to ease of possible resyncs. Some warnings are suppressed via CFLAGS. There are some style problems but I'm not touching them for now for the above mentioned reason. There is obviously some room for optimisation, some structure fields are unused as well as (probably) some code. This is a fine way to go. This is not a replacement for existing MUSB driver (at least for now), cause there are still consumers of USB serial gadget which uses old API and there is no support for serial with new API for now. I'm a little lost. In the kernel, you can't use CONFIG_USB_G_SERIAL with CONFIG_USB_MUSB_${hw glue} ? In general, things look OK but please run it through checkpatch.pl, use just one Signed-off-by line and fixup if (...) { ... one line ... } in the glue code you add that's not synced up from the kernel (I saw one in the am335x bits). Thanks! And lets move this out of RFC... -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH v3 0/13] Port of MUSB driver from Linux (changes from Linux)
Current MUSB driver in U-Boot uses old UDC API while new gagdet client drivers need new gadget API. Also current MUSB driver has some significant limitations (like inability to handle tx for endpoints other than ep0). So I think port of new Linux driver is desirable. This is initial port, performed mostly by putting DM and OTG code under #ifndef __UBOOT__ clauses. My intention was to be as close as possible to the original to ease of possible resyncs. Some warnings are suppressed via CFLAGS. There are some style problems but I'm not touching them for now for the above mentioned reason. There is obviously some room for optimisation, some structure fields are unused as well as (probably) some code. This is not a replacement for existing MUSB driver (at least for now), cause there are still consumers of USB serial gadget which uses old API and there is no support for serial with new API for now. OTG and DMA are not supported. Ported drivers include: musb_dsps (should work both with TI AM33xx and TI81xx, tested only on AM33xx), am35x (tested on AM3517 EVM) and omap2plus (should work on OMAP2/3/4, tested on omap3_beagle, omap4_panda doesn't work and needs more work). Others should be easy to port too. Virtual root hub is not implemented but this shouldn't be a big problem as the old code has virtual root hub support enabled only for Blackfin platform. Pathes are rather big because of the original code size (and I didn't delete unused code, just disabled it). So it's probably better to look at changes as compared to Linux code. I prepared such version also, you can find it at [1]. Hopefully it will be also useful if resync with the kernel will be needed in future. [1] https://github.com/yanok/u-boot/tree/musb-changes-from-linux-v3 Changes in v3: - fix old MUSB code compilation - bugfix: struct musb should be zeroed after alloc - fix musb gadget_chips entry - fix for new multi-interface usb API - use clrsetbits_le32 for USB PHY ops Changes in v2: - add missing linux-compat.h header - added host support - glue code moved from musb_gadget_uboot.c to musb_uboot.c and cleaned up slightly. - added check for malloc return value - define is_{host,peripheral}_capable conditionally to support compilation with only host or gadget enabled - added some more is_{host,peripheral}_capable guards to core code to support compilation with only host or gadget enabled - rename backend config option to CONFIG_USB_MUSB_DSPS - we are providing host support now so add yourself to usb.h Ilya Yanok (13): linux/usb/ch9.h: update with the version from Linux tree usb: use linux/usb/ch9.h instead of usbdescriptors.h musb-new: port of Linux musb driver musb-new: dsps backend driver am33xx: init OTG hardware and new musb gadget driver am335x_evm: enable both musb gadget and host musb-new: am35x backend driver OMAP3: am35x_def.h: add USB defines OMAP3: am35x: add musb functions am3517_evm: switch to musb-new musb-new: omap2plus backend driver omap3_beagle: add musb-new init omap3_beagle: use new MUSB intstead of the old one Makefile |1 + arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c |2 +- arch/arm/cpu/armv7/am33xx/board.c | 103 +- arch/arm/cpu/armv7/am33xx/clock.c |8 + arch/arm/cpu/armv7/omap3/Makefile |1 + arch/arm/cpu/armv7/omap3/am35x_musb.c | 75 + arch/arm/include/asm/arch-am33xx/cpu.h| 11 +- arch/arm/include/asm/arch-am33xx/hardware.h |4 + arch/arm/include/asm/arch-omap3/am35x_def.h | 27 + arch/arm/include/asm/arch-omap3/musb.h| 28 + arch/arm/include/asm/omap_musb.h | 32 + arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.c |2 +- arch/powerpc/cpu/mpc5xxx/usb_ohci.c |2 +- arch/powerpc/cpu/ppc4xx/usb_ohci.c|2 +- board/logicpd/am3517evm/am3517evm.c | 74 + board/ti/beagle/beagle.c | 43 + common/cmd_usb.c |2 +- common/usb.c |4 +- drivers/usb/gadget/config.c |1 - drivers/usb/gadget/epautoconf.c |1 - drivers/usb/gadget/ether.c|1 - drivers/usb/gadget/gadget_chips.h |4 +- drivers/usb/gadget/s3c_udc_otg.c |1 - drivers/usb/gadget/usbstring.c|1 - drivers/usb/host/ehci-hcd.c | 16 +- drivers/usb/host/isp116x-hcd.c|2 +- drivers/usb/host/ohci-hcd.c |2 +- drivers/usb/host/sl811-hcd.c |2 +- drivers/usb/musb-new/Makefile | 39 + drivers/usb/musb-new/am35x.c | 709 +++ drivers/usb/musb-new/linux-compat.h | 119 ++ drivers/usb/musb-new/musb_core.c | 2497 + drivers/usb/musb-new/musb_core.h | 623 ++