From 32d4060f845d189308d3431a7df4931ab4bd8f01 Mon Sep 17 00:00:00 2001 From: Ye Li Date: Tue, 9 May 2017 00:43:05 -0500 Subject: MLK-14845 mx6/mx7: Not call usb setup functions used by non-DM driver Use CONFIG_DM_USB to comment out USB setup functions used by non-DM driver. So they won't be executed when using DM driver. These USB setup functions may setup power control pins to USB_PWR function not GPIO, which is different as the GPIO function used by USB vbus-supply. And cause the power control not work. Signed-off-by: Ye Li --- board/freescale/mx6sxsabreauto/mx6sxsabreauto.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'board/freescale/mx6sxsabreauto') diff --git a/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c b/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c index 09cdd12..648dbf0 100644 --- a/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c +++ b/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c @@ -217,6 +217,8 @@ void ldo_mode_set(int ldo_bypass) #endif #ifdef CONFIG_USB_EHCI_MX6 +#ifndef CONFIG_DM_USB + #define USB_OTHERREGS_OFFSET 0x800 #define UCTRL_PWR_POL (1 << 9) @@ -258,6 +260,7 @@ int board_ehci_hcd_init(int port) return 0; } #endif +#endif int board_early_init_f(void) { @@ -499,8 +502,10 @@ int board_init(void) dm_gpio_set_value(&desc, 0); #ifdef CONFIG_USB_EHCI_MX6 +#ifndef CONFIG_DM_USB setup_usb(); #endif +#endif #ifdef CONFIG_FSL_QSPI board_qspi_init(); -- cgit v1.1