MLK-23110-1 usb: Decouple the CI_UDC DM gadget driver with EHCI MX6 driver
authorYe Li <ye.li@nxp.com>
Wed, 11 Dec 2019 08:28:17 +0000 (00:28 -0800)
committerYe Li <ye.li@nxp.com>
Thu, 29 Apr 2021 07:56:36 +0000 (00:56 -0700)
commitf1fc6faa99e66ceb801503db28b3ce8fc01c4138
treedb5006c3423c51e124eb5d7e46ece6e4757c3ecc
parent5207fd4246a94c21a4be836286b75db76fd76708
MLK-23110-1 usb: Decouple the CI_UDC DM gadget driver with EHCI MX6 driver

On 2019.04 SPL, we enabled DM gadget driver for QM/QXP to support
dual USB ports. The CI_UDC DM gadget driver will call init function
inside EHCI mx6 driver, so when building SPL on iMX8QM/QXP with CI UDC
enabled, we have to enable usb host driver as well, and this introduces
about more than 40KB size to SPL.

Move the common codes to a independent file, so that both host driver
and gadget driver can call it, then decouple the host and gadget driver.

Note: the patch only applies to ci_udc gadget DM driver. For non-DM gadget
driver, it still depends ehci host interfaces.

Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 1afed171a77b4c95cd4ea76f29d5a0a6bb199820)
(cherry picked from commit 6680499ca4d3a740df5c0aa5a5e66f6d93f827fb)
Makefile
drivers/usb/gadget/ci_udc.c
drivers/usb/host/ehci-mx6.c
drivers/usb/imx/Makefile [new file with mode: 0644]
drivers/usb/imx/usb-mx6-common.c [new file with mode: 0644]
include/usb/ci_udc.h
include/usb/usb_mx6_common.h [new file with mode: 0644]
scripts/Makefile.spl