diff mbox series

[v4,1/4] usb: dwc3: imx8mp: rename iomem base pointer

Message ID 20220126141340.234125-2-alexander.stein@ew.tq-group.com (mailing list archive)
State New, archived
Headers show
Series i.MX8MP: more USB3 glue layer feature support | expand

Commit Message

Alexander Stein Jan. 26, 2022, 2:13 p.m. UTC
Until now the iomem used is not USB glue as the name suggests, but
HSIO BLK_CTL. Rename the struct member accordingly. This is a preparing
patch for when USB glue is actually used.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
 drivers/usb/dwc3/dwc3-imx8mp.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

Comments

Jun Li Feb. 18, 2022, 4:52 a.m. UTC | #1
> -----Original Message-----
> From: Alexander Stein <alexander.stein@ew.tq-group.com>
> Sent: Wednesday, January 26, 2022 10:14 PM
> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Rob Herring
> <robh+dt@kernel.org>; Shawn Guo <shawnguo@kernel.org>; Sascha Hauer
> <s.hauer@pengutronix.de>; Fabio Estevam <festevam@gmail.com>
> Cc: Alexander Stein <alexander.stein@ew.tq-group.com>; dl-linux-imx
> <linux-imx@nxp.com>; linux-usb@vger.kernel.org;
> devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; Jun Li
> <jun.li@nxp.com>
> Subject: [PATCH v4 1/4] usb: dwc3: imx8mp: rename iomem base pointer
> 
> Until now the iomem used is not USB glue as the name suggests, but HSIO BLK_CTL.
> Rename the struct member accordingly. This is a preparing patch for when
> USB glue is actually used.
> 
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>

Reviewed-by: Li Jun <jun.li@nxp.com>

> ---
>  drivers/usb/dwc3/dwc3-imx8mp.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/usb/dwc3/dwc3-imx8mp.c
> b/drivers/usb/dwc3/dwc3-imx8mp.c index d328d20abfbc..1c8fe657b3a9 100644
> --- a/drivers/usb/dwc3/dwc3-imx8mp.c
> +++ b/drivers/usb/dwc3/dwc3-imx8mp.c
> @@ -39,7 +39,7 @@
>  struct dwc3_imx8mp {
>  	struct device			*dev;
>  	struct platform_device		*dwc3;
> -	void __iomem			*glue_base;
> +	void __iomem			*hsio_blk_base;
>  	struct clk			*hsio_clk;
>  	struct clk			*suspend_clk;
>  	int				irq;
> @@ -55,7 +55,7 @@ static void dwc3_imx8mp_wakeup_enable(struct dwc3_imx8mp
> *dwc3_imx)
>  	if (!dwc3)
>  		return;
> 
> -	val = readl(dwc3_imx->glue_base + USB_WAKEUP_CTRL);
> +	val = readl(dwc3_imx->hsio_blk_base + USB_WAKEUP_CTRL);
> 
>  	if ((dwc3->current_dr_role == DWC3_GCTL_PRTCAP_HOST) && dwc3->xhci)
>  		val |= USB_WAKEUP_EN | USB_WAKEUP_SS_CONN | @@ -64,16 +64,16 @@ static
> void dwc3_imx8mp_wakeup_enable(struct dwc3_imx8mp *dwc3_imx)
>  		val |= USB_WAKEUP_EN | USB_WAKEUP_VBUS_EN |
>  		       USB_WAKEUP_VBUS_SRC_SESS_VAL;
> 
> -	writel(val, dwc3_imx->glue_base + USB_WAKEUP_CTRL);
> +	writel(val, dwc3_imx->hsio_blk_base + USB_WAKEUP_CTRL);
>  }
> 
>  static void dwc3_imx8mp_wakeup_disable(struct dwc3_imx8mp *dwc3_imx)  {
>  	u32 val;
> 
> -	val = readl(dwc3_imx->glue_base + USB_WAKEUP_CTRL);
> +	val = readl(dwc3_imx->hsio_blk_base + USB_WAKEUP_CTRL);
>  	val &= ~(USB_WAKEUP_EN | USB_WAKEUP_EN_MASK);
> -	writel(val, dwc3_imx->glue_base + USB_WAKEUP_CTRL);
> +	writel(val, dwc3_imx->hsio_blk_base + USB_WAKEUP_CTRL);
>  }
> 
>  static irqreturn_t dwc3_imx8mp_interrupt(int irq, void *_dwc3_imx) @@
> -115,9 +115,9 @@ static int dwc3_imx8mp_probe(struct platform_device *pdev)
> 
>  	dwc3_imx->dev = dev;
> 
> -	dwc3_imx->glue_base = devm_platform_ioremap_resource(pdev, 0);
> -	if (IS_ERR(dwc3_imx->glue_base))
> -		return PTR_ERR(dwc3_imx->glue_base);
> +	dwc3_imx->hsio_blk_base = devm_platform_ioremap_resource(pdev, 0);
> +	if (IS_ERR(dwc3_imx->hsio_blk_base))
> +		return PTR_ERR(dwc3_imx->hsio_blk_base);
> 
>  	dwc3_imx->hsio_clk = devm_clk_get(dev, "hsio");
>  	if (IS_ERR(dwc3_imx->hsio_clk)) {
> --
> 2.25.1
diff mbox series

Patch

diff --git a/drivers/usb/dwc3/dwc3-imx8mp.c b/drivers/usb/dwc3/dwc3-imx8mp.c
index d328d20abfbc..1c8fe657b3a9 100644
--- a/drivers/usb/dwc3/dwc3-imx8mp.c
+++ b/drivers/usb/dwc3/dwc3-imx8mp.c
@@ -39,7 +39,7 @@ 
 struct dwc3_imx8mp {
 	struct device			*dev;
 	struct platform_device		*dwc3;
-	void __iomem			*glue_base;
+	void __iomem			*hsio_blk_base;
 	struct clk			*hsio_clk;
 	struct clk			*suspend_clk;
 	int				irq;
@@ -55,7 +55,7 @@  static void dwc3_imx8mp_wakeup_enable(struct dwc3_imx8mp *dwc3_imx)
 	if (!dwc3)
 		return;
 
-	val = readl(dwc3_imx->glue_base + USB_WAKEUP_CTRL);
+	val = readl(dwc3_imx->hsio_blk_base + USB_WAKEUP_CTRL);
 
 	if ((dwc3->current_dr_role == DWC3_GCTL_PRTCAP_HOST) && dwc3->xhci)
 		val |= USB_WAKEUP_EN | USB_WAKEUP_SS_CONN |
@@ -64,16 +64,16 @@  static void dwc3_imx8mp_wakeup_enable(struct dwc3_imx8mp *dwc3_imx)
 		val |= USB_WAKEUP_EN | USB_WAKEUP_VBUS_EN |
 		       USB_WAKEUP_VBUS_SRC_SESS_VAL;
 
-	writel(val, dwc3_imx->glue_base + USB_WAKEUP_CTRL);
+	writel(val, dwc3_imx->hsio_blk_base + USB_WAKEUP_CTRL);
 }
 
 static void dwc3_imx8mp_wakeup_disable(struct dwc3_imx8mp *dwc3_imx)
 {
 	u32 val;
 
-	val = readl(dwc3_imx->glue_base + USB_WAKEUP_CTRL);
+	val = readl(dwc3_imx->hsio_blk_base + USB_WAKEUP_CTRL);
 	val &= ~(USB_WAKEUP_EN | USB_WAKEUP_EN_MASK);
-	writel(val, dwc3_imx->glue_base + USB_WAKEUP_CTRL);
+	writel(val, dwc3_imx->hsio_blk_base + USB_WAKEUP_CTRL);
 }
 
 static irqreturn_t dwc3_imx8mp_interrupt(int irq, void *_dwc3_imx)
@@ -115,9 +115,9 @@  static int dwc3_imx8mp_probe(struct platform_device *pdev)
 
 	dwc3_imx->dev = dev;
 
-	dwc3_imx->glue_base = devm_platform_ioremap_resource(pdev, 0);
-	if (IS_ERR(dwc3_imx->glue_base))
-		return PTR_ERR(dwc3_imx->glue_base);
+	dwc3_imx->hsio_blk_base = devm_platform_ioremap_resource(pdev, 0);
+	if (IS_ERR(dwc3_imx->hsio_blk_base))
+		return PTR_ERR(dwc3_imx->hsio_blk_base);
 
 	dwc3_imx->hsio_clk = devm_clk_get(dev, "hsio");
 	if (IS_ERR(dwc3_imx->hsio_clk)) {