]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
usb: ci_udc: support variants with hostpc register
authorStephen Warren <swarren@nvidia.com>
Thu, 24 Apr 2014 23:52:39 +0000 (17:52 -0600)
committerMarek Vasut <marex@denx.de>
Wed, 30 Apr 2014 08:30:57 +0000 (10:30 +0200)
commitfcf2ede190e054edcb804ba7786dd024b388a160
tree06ad9e6722dc62a3f52830f53ef9a2f8e4d74d24
parent0c51dc6db9ea0e3912d1d3e2d953bc22de433c60
usb: ci_udc: support variants with hostpc register

Tegra's USB controller appears to be a variant of the ChipIdea
controller; perhaps derived from it, or simply a different version of
the IP core to what U-Boot supports today.

In this variant, at least the following difference are present:
- Some registers are moved about.
- Setup transaction completion is reported in a separate 'epsetupstat'
  register, rather than in 'epstat' (which still exists, perhaps for
  other transaction types).
- USB connection speed is reported in a separate 'hostpc1_devlc'
  register, rather than 'portsc'.
- The registers used by ci_udc.c begin at offset 0x130 from the USB
  register base, rather than offset 0x140. However, this is handled
  by the associated EHCI controller driver, since the register address
  is stored in controller.ctrl->hcor.

Introduce define CONFIG_CI_UDC_HAS_HOSTPC to indicate which variant of
the controller should be supported. The "HAS_HOSTPC" part of this name
mirrors the similar "has_hostpc" field used by the Linux EHCI controller
core to represent the presence/absence of the hostpc1_devlc register.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
drivers/usb/gadget/ci_udc.c
drivers/usb/gadget/ci_udc.h