[PATCH 4/6] usb: chipidea: usbmisc_imx: Add prefix to register defines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The driver is used for a broad range of i.MX SoCs and most of the
register defines have a SoC/regname specific prefix to make clear
in which context they should be used. Add such a prefix to the
MX7D_USB_OTG_PHY_CFG1 defines as well.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 drivers/usb/chipidea/usbmisc_imx.c | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c
index 95f2ba01c0df1..63de7d6fea427 100644
--- a/drivers/usb/chipidea/usbmisc_imx.c
+++ b/drivers/usb/chipidea/usbmisc_imx.c
@@ -126,8 +126,8 @@
 #define MX7D_USB_OTG_PHY_STATUS_CHRGDET		BIT(29)
 
 #define MX7D_USB_OTG_PHY_CFG1		0x30
-#define TXPREEMPAMPTUNE0		GENMASK(29, 28)
-#define TXVREFTUNE0			GENMASK(23, 20)
+#define MX7D_USB_OTG_PHY_CFG1_TXPREEMPAMPTUNE0	GENMASK(29, 28)
+#define MX7D_USB_OTG_PHY_CFG1_TXVREFTUNE0	GENMASK(23, 20)
 
 #define MX6_USB_OTG_WAKEUP_BITS (MX6_BM_WAKEUP_ENABLE | MX6_BM_VBUS_WAKEUP | \
 				 MX6_BM_ID_WAKEUP)
@@ -659,15 +659,19 @@ static int usbmisc_imx7d_init(struct imx_usbmisc_data *data)
 		/* PHY tuning for signal quality */
 		reg = readl(usbmisc->base + MX7D_USB_OTG_PHY_CFG1);
 		if (data->emp_curr_control &&
-		    FIELD_FIT(TXPREEMPAMPTUNE0, data->emp_curr_control)) {
-			reg &= ~TXPREEMPAMPTUNE0;
-			reg |= FIELD_PREP(TXPREEMPAMPTUNE0, data->emp_curr_control);
+		    FIELD_FIT(MX7D_USB_OTG_PHY_CFG1_TXPREEMPAMPTUNE0,
+			      data->emp_curr_control)) {
+			reg &= ~MX7D_USB_OTG_PHY_CFG1_TXPREEMPAMPTUNE0;
+			reg |= FIELD_PREP(MX7D_USB_OTG_PHY_CFG1_TXPREEMPAMPTUNE0,
+					  data->emp_curr_control);
 		}
 
 		if (data->dc_vol_level_adjust &&
-		    FIELD_FIT(TXVREFTUNE0, data->dc_vol_level_adjust)) {
-			reg &= ~TXVREFTUNE0;
-			reg |= FIELD_PREP(TXVREFTUNE0, data->dc_vol_level_adjust);
+		    FIELD_FIT(MX7D_USB_OTG_PHY_CFG1_TXVREFTUNE0,
+			      data->dc_vol_level_adjust)) {
+			reg &= ~MX7D_USB_OTG_PHY_CFG1_TXVREFTUNE0;
+			reg |= FIELD_PREP(MX7D_USB_OTG_PHY_CFG1_TXVREFTUNE0,
+					  data->dc_vol_level_adjust);
 		}
 
 		writel(reg, usbmisc->base + MX7D_USB_OTG_PHY_CFG1);
-- 
2.30.2




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux