[PATCH] usb: host: ehci-platform: Update brcm, xgs-iproc-ehci workaround

Chris Packham posted 1 patch 4 years, 4 months ago
drivers/usb/host/ehci-platform.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
[PATCH] usb: host: ehci-platform: Update brcm, xgs-iproc-ehci workaround
Posted by Chris Packham 4 years, 4 months ago
The original workaround was added prior to commit e4788edc730a ("USB:
EHCI: Add alias for Broadcom INSNREG"). Now that brcm_insnreg exists in
struct ehci_regs we can use that instead of having a local definition.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
---
 drivers/usb/host/ehci-platform.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c
index c3dc906274d9..1115431a255d 100644
--- a/drivers/usb/host/ehci-platform.c
+++ b/drivers/usb/host/ehci-platform.c
@@ -43,7 +43,6 @@
 #define hcd_to_ehci_priv(h) ((struct ehci_platform_priv *)hcd_to_ehci(h)->priv)
 
 #define BCM_USB_FIFO_THRESHOLD	0x00800040
-#define bcm_iproc_insnreg01	hostpc[0]
 
 struct ehci_platform_priv {
 	struct clk *clks[EHCI_MAX_CLKS];
@@ -81,7 +80,7 @@ static int ehci_platform_reset(struct usb_hcd *hcd)
 
 	if (of_device_is_compatible(pdev->dev.of_node, "brcm,xgs-iproc-ehci"))
 		ehci_writel(ehci, BCM_USB_FIFO_THRESHOLD,
-			    &ehci->regs->bcm_iproc_insnreg01);
+			    &ehci->regs->brcm_insnreg[1]);
 
 	return 0;
 }
-- 
2.35.1

Re: [PATCH] usb: host: ehci-platform: Update brcm, xgs-iproc-ehci workaround
Posted by Alan Stern 4 years, 4 months ago
On Tue, Feb 15, 2022 at 01:08:13PM +1300, Chris Packham wrote:
> The original workaround was added prior to commit e4788edc730a ("USB:
> EHCI: Add alias for Broadcom INSNREG"). Now that brcm_insnreg exists in
> struct ehci_regs we can use that instead of having a local definition.
> 
> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
> ---

Acked-by: Alan Stern <stern@rowland.harvard.edu>

>  drivers/usb/host/ehci-platform.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c
> index c3dc906274d9..1115431a255d 100644
> --- a/drivers/usb/host/ehci-platform.c
> +++ b/drivers/usb/host/ehci-platform.c
> @@ -43,7 +43,6 @@
>  #define hcd_to_ehci_priv(h) ((struct ehci_platform_priv *)hcd_to_ehci(h)->priv)
>  
>  #define BCM_USB_FIFO_THRESHOLD	0x00800040
> -#define bcm_iproc_insnreg01	hostpc[0]
>  
>  struct ehci_platform_priv {
>  	struct clk *clks[EHCI_MAX_CLKS];
> @@ -81,7 +80,7 @@ static int ehci_platform_reset(struct usb_hcd *hcd)
>  
>  	if (of_device_is_compatible(pdev->dev.of_node, "brcm,xgs-iproc-ehci"))
>  		ehci_writel(ehci, BCM_USB_FIFO_THRESHOLD,
> -			    &ehci->regs->bcm_iproc_insnreg01);
> +			    &ehci->regs->brcm_insnreg[1]);
>  
>  	return 0;
>  }