]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
usb: dwc2: Rename CONFIG_DWC2_UTMI_PHY_WIDTH to CONFIG_DWC2_UTMI_WIDTH
authorAlexey Brodkin <Alexey.Brodkin@synopsys.com>
Wed, 31 Jan 2018 14:56:59 +0000 (17:56 +0300)
committerMarek Vasut <marex@denx.de>
Thu, 15 Feb 2018 12:44:27 +0000 (13:44 +0100)
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 <abrodkin@synopsys.com>
Cc: Marek Vasut <marex@denx.de>
drivers/usb/host/dwc2.c
drivers/usb/host/dwc2.h

index 540c016412b37cbbb1b1d0734cf721692f1085e2..0efe645044c547dbd538bcaf34edc5994ec31bd9 100644 (file)
@@ -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
        }
index 4482dc621d692f30445f28d56ff793ecbd844767..574607a2acbb0a16200cad45ced5705094177ea2 100644 (file)
@@ -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 */