[U-Boot] [RFC PATCH 0/5] Port of MUSB gadget driver from Linux
Ilya Yanok
ilya.yanok at cogentembedded.com
Wed Aug 8 23:12:56 CEST 2012
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, host 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 host mode is not supported and there are still consumers
of the old interface.
Host mode, OTG and DMA are not supported. The only ported driver
is for TI AM33xx, but others should be easy to port too.
Tested it on AM335x EVM and BeagleBone with CDC Ethernet gadget.
Ilya Yanok (5):
linux/usb/ch9.h: update with the version from Linux tree
musb-new: port of Linux musb gadget driver
musb-new: dsps backend driver
am33xx: init OTG hardware and new musb gadget driver
am335x_evm: enable musb gadget on port 0
Makefile | 1 +
arch/arm/cpu/armv7/am33xx/board.c | 81 +-
arch/arm/cpu/armv7/am33xx/clock.c | 8 +
arch/arm/include/asm/arch-am33xx/cpu.h | 11 +-
arch/arm/include/asm/arch-am33xx/hardware.h | 4 +
arch/arm/include/asm/omap_musb.h | 25 +
drivers/usb/gadget/config.c | 1 -
drivers/usb/gadget/epautoconf.c | 1 -
drivers/usb/gadget/ether.c | 1 -
drivers/usb/gadget/gadget_chips.h | 2 +
drivers/usb/gadget/s3c_udc_otg.c | 1 -
drivers/usb/gadget/usbstring.c | 1 -
drivers/usb/musb-new/Makefile | 36 +
drivers/usb/musb-new/musb_core.c | 2489 +++++++++++++++++++++++++++
drivers/usb/musb-new/musb_core.h | 611 +++++++
drivers/usb/musb-new/musb_debug.h | 58 +
drivers/usb/musb-new/musb_dma.h | 186 ++
drivers/usb/musb-new/musb_dsps.c | 769 +++++++++
drivers/usb/musb-new/musb_gadget.c | 2319 +++++++++++++++++++++++++
drivers/usb/musb-new/musb_gadget.h | 127 ++
drivers/usb/musb-new/musb_gadget_ep0.c | 1089 ++++++++++++
drivers/usb/musb-new/musb_gadget_uboot.c | 72 +
drivers/usb/musb-new/musb_io.h | 146 ++
drivers/usb/musb-new/musb_regs.h | 645 +++++++
include/configs/am335x_evm.h | 19 +
include/linux/usb/ch9.h | 514 +++++-
include/linux/usb/musb.h | 162 ++
include/usb/s3c_udc.h | 1 -
28 files changed, 9355 insertions(+), 25 deletions(-)
create mode 100644 arch/arm/include/asm/omap_musb.h
create mode 100644 drivers/usb/musb-new/Makefile
create mode 100644 drivers/usb/musb-new/musb_core.c
create mode 100644 drivers/usb/musb-new/musb_core.h
create mode 100644 drivers/usb/musb-new/musb_debug.h
create mode 100644 drivers/usb/musb-new/musb_dma.h
create mode 100644 drivers/usb/musb-new/musb_dsps.c
create mode 100644 drivers/usb/musb-new/musb_gadget.c
create mode 100644 drivers/usb/musb-new/musb_gadget.h
create mode 100644 drivers/usb/musb-new/musb_gadget_ep0.c
create mode 100644 drivers/usb/musb-new/musb_gadget_uboot.c
create mode 100644 drivers/usb/musb-new/musb_io.h
create mode 100644 drivers/usb/musb-new/musb_regs.h
create mode 100644 include/linux/usb/musb.h
--
1.7.9.5
More information about the U-Boot
mailing list