usb:g_dnl: Add name parameter to g_dnl_bind_fixup function

New parameter, namely *name has been added to g_dnl_bind_fixup().
It is necessary (for compatibility reasons) to assign new USB idProduct
and idVendor for different usb functions.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
usb:g_dnl:f_thor: USB download function to support TIZEN's THOR protocol

Implementation of USB download function which supports THOR protocol.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
usb:g_dnl: Support for TIZEN's THOR function in generic download code

Support of "thor" function in generic download code (g_dnl.c).

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
cmd:thor: Support for TIZEN's download command (thordown)

New command - thordown - has been added to support downloading data
via lthor TIZEN program.
It is similar to dfu command syntax and reuses its code for flashing data.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
samsung:common:thor: Define common Samsung code to handle THOR usb descriptor setup

Special, common to Samsung, function for altering usb descriptor's
idVendor and idProduct has been added.
For compatibility reasons (Win vs Linux) the THOR idProduct must be
different than the one for DFU/UMS.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
trats: Update TRATS config to support TIZEN download

A set of environment variables needs to be updated to provide support for
TIZEN download command (tizendown).

Since DFU is used as a flashing backend, it is also necessary to extent
malloc pool size for DFU buffer allocation.
Moreover, for compatibility reasons (Win vs. Lin) new USB idProduct number
for download gadget had to be added.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
usb: omap: Move the xhci-omap header file to common location

Moving the xhci-omap header to a more global location so that
other code can reference this code.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
usb: omap5: Update the board_usb_init api

Recent patches declares board_usb_init function prototype for a new
usb architecture.

Turning on the OMAP_XHCI defines cause a redefinition compiler failure.
So update the board_usb_init to the latest prototype.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
usb: omap: Move the usb phy code to the usb/phy directory

Moving the usb/phy code from xhci-omap to the usb/phy directory
and moving the associated phy code over to the new file.

Newer TI processors adding xHCI support will have different PHY configurations
so therefore abstracting this code away will prevent messing around with the
xhci-omap file itself.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
usb: dra7xx: Add support for dra7xx xhci USB host

Add the support for the dra7xx xhci usb host.
dra7xx does not contain an EHCI controller so the headers
can be removed from the board file.

The xHCI host on dra7xx is connected to a usb2 phy so need to
add support to enable those clocks.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
usb: am437x: Add support for am437x xhci USB host

Add the support for the am437x xhci usb host.

The xHCI host on AM437 is connected to a usb2 phy so need to
add support to enable those clocks.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
ARM: omap5-evm: Move MAC creation to misc_init

Move the MAC creation from the USB init to an function
that is called on every boot.  This will then populate the
usbethaddr mac that kernel driver can pick up from the
device tree blob.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
usb: rename board_usb_init_type to usb_init_type

This will be used by usb_lowlevel_init so it will
no longer be used by only board specific functions.

Move definition of enum usb_init_type higher in file
so that it will be available for usb_low_level_init.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
usb: add enum usb_init_type parameter to usb_lowlevel_init

This parameter will later be used to verify OTG ports.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
usb: ehci-hcd: add enum usb_init_type parameter to ehci_hcd_init.

This paramter will later be used to initialize OTG ports in
host or device mode.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
usb: gadget: mv_udc: don't check CONFIG_USB_MAX_CONTROLLER_COUNT

i.mx6 has 1 otg controller, and 3 host ports. So,
CONFIG_USB_MAX_CONTROLLER_COUNT can be greater than 1
even though only 1 device mode controller is supported.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
usb: ehci-mx6: add support for otg port

Previously, only host1 was supported using an index of 0.
Now, otg has index 0, host1 is 1, host2 is 2, host3 is 3.
Since OTG requires usbmode to be set after reset, I added
CONFIG_EHCI_HCD_INIT_AFTER_RESET to nitrogen6x.h and
mx6qsabreauto.h.

I also added a weak function board_ehci_power to handle
turning power on/off for otg.

Type is type of device connected (USB stick vs Host.)
Init is type of device desired.
Only power up port if type == init == USB_INIT_HOST.
Only return error if type != init.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
usb: gadget: mv_udc: fix full speed connections

Set maximum packet length in queue header to wMaxPacketSize
of endpoint.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
usb: gadget: mv_udc: optimize bounce

Only perform one copy, either in the bounce
routine for IN transfers, or the debounce
rtn for OUT transfer.

On out transfers, only copy the number
of bytes received from the bounce buffer

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
usb: gadget: mv_udc: optimize ep_enable

Only get head if not ep0.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>