MLK-22336-1 usb: ci_udc: Convert driver to DM_USB_GADGET
authorSherry Sun <sherry.sun@nxp.com>
Tue, 23 Jul 2019 19:21:57 +0000 (15:21 -0400)
committerSherry Sun <sherry.sun@nxp.com>
Tue, 30 Jul 2019 23:28:54 +0000 (19:28 -0400)
commit5c50d6bd6fda34827a27387e42c9a803da40b1e5
tree1f7741f180f0335d1983c49bc8944e88ca01fc52
parent4a4ef819c20d93699378930592a62a098a42ad82
MLK-22336-1 usb: ci_udc: Convert driver to DM_USB_GADGET

Convert the ci_udc driver to driver model by using the uclass
UCLASS_USB_GADGET_GENERIC. The clk and power of USB controller and USB
PHY both are initialized by parsing the device tree nodes.

If CONFIG_DM_USB_GADGET is defined, we use the ci_udc driver in DM way,
if it does not defined, we can use ci_udc driver in its original Non-DM
way.

Move some USB PHY register definitions from ehci-mx6.c to
asm/mach-imx/regs-usbphy.h in order to share with DM usb gadget driver.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
arch/arm/include/asm/mach-imx/regs-usbphy.h
drivers/usb/gadget/ci_udc.c
drivers/usb/host/ehci-mx6.c
include/usb/ci_udc.h