From 163f8858ae8bfcd94ef8d6c4ed75ff3abb642450 Mon Sep 17 00:00:00 2001 From: Alexey Brodkin Date: Wed, 31 Jan 2018 17:56:59 +0300 Subject: usb: dwc2: Rename CONFIG_DWC2_UTMI_PHY_WIDTH to CONFIG_DWC2_UTMI_WIDTH For some reason from day one we used to have both CONFIG_DWC2_UTMI_WIDTH mentioned in dwc2.h and in scripts/config_whitelist.txt but never really used and CONFIG_DWC2_UTMI_PHY_WIDTH used in real code in dwc2.c (but never defined). Moreover even though CONFIG_DWC2_UTMI_WIDTH might be either 8 or 16 depending on hardware (and the same is said in a comment for it in dwc2.h) but then 8 is hardcoded in the header leaving no ability to override this value in board's configuration. Signed-off-by: Alexey Brodkin Cc: Marek Vasut --- drivers/usb/host/dwc2.c | 2 +- drivers/usb/host/dwc2.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c index 540c016412b..0efe645044c 100644 --- a/drivers/usb/host/dwc2.c +++ b/drivers/usb/host/dwc2.c @@ -375,7 +375,7 @@ static void dwc_otg_core_init(struct dwc2_priv *priv) usbcfg &= ~DWC2_GUSBCFG_DDRSEL; #endif } else { /* UTMI+ interface */ -#if (CONFIG_DWC2_UTMI_PHY_WIDTH == 16) +#if (CONFIG_DWC2_UTMI_WIDTH == 16) usbcfg |= DWC2_GUSBCFG_PHYIF; #endif } diff --git a/drivers/usb/host/dwc2.h b/drivers/usb/host/dwc2.h index 4482dc621d6..574607a2acb 100644 --- a/drivers/usb/host/dwc2.h +++ b/drivers/usb/host/dwc2.h @@ -775,7 +775,9 @@ struct dwc2_core_regs { #define DWC2_PHY_TYPE_UTMI 1 #define DWC2_PHY_TYPE_ULPI 2 #define CONFIG_DWC2_PHY_TYPE DWC2_PHY_TYPE_UTMI /* PHY type */ +#ifndef CONFIG_DWC2_UTMI_WIDTH #define CONFIG_DWC2_UTMI_WIDTH 8 /* UTMI bus width (8/16) */ +#endif #undef CONFIG_DWC2_PHY_ULPI_DDR /* ULPI PHY uses DDR mode */ #define CONFIG_DWC2_PHY_ULPI_EXT_VBUS /* ULPI PHY controls VBUS */ -- cgit v1.2.3 From b16c129c2290d26e7b16b4309713c78f6146bc8a Mon Sep 17 00:00:00 2001 From: Faiz Abbas Date: Thu, 15 Feb 2018 17:12:11 +0530 Subject: usb: host: xhci-omap: Remove redundant board_usb_init and board_usb_cleanup functions board_usb_init()/_cleanup() should be in board files and don't have a place in the xhci-omap driver. Weak versions for board_usb_init()/_cleanup() already exist in common/usb.c (for host mode) and drivers/usb/gadget/g_dnl.c (for gadget mode). Therefore, remove init and cleanup functions from xhci-omap and implement them in the board files. Signed-off-by: Faiz Abbas Reviewed-by: Marek Vasut Reviewed-by: Bin Meng --- drivers/usb/host/xhci-omap.c | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'drivers') diff --git a/drivers/usb/host/xhci-omap.c b/drivers/usb/host/xhci-omap.c index d6c57448184..b814500bdbb 100644 --- a/drivers/usb/host/xhci-omap.c +++ b/drivers/usb/host/xhci-omap.c @@ -27,28 +27,6 @@ DECLARE_GLOBAL_DATA_PTR; static struct omap_xhci omap; -__weak int omap_xhci_board_usb_init(int index, enum usb_init_type init) -{ - enable_usb_clocks(index); - return 0; -} - -int board_usb_init(int index, enum usb_init_type init) -{ - return omap_xhci_board_usb_init(index, init); -} - -__weak int omap_xhci_board_usb_cleanup(int index, enum usb_init_type init) -{ - disable_usb_clocks(index); - return 0; -} - -int board_usb_cleanup(int index, enum usb_init_type init) -{ - return omap_xhci_board_usb_cleanup(index, init); -} - static int omap_xhci_core_init(struct omap_xhci *omap) { int ret = 0; -- cgit v1.2.3