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)