[PATCH] staging: octeon-usb: use __delay() instead of cvmx_wait()

James Hogan james.hogan at mips.com
Fri Nov 17 10:06:52 UTC 2017


On Fri, Nov 17, 2017 at 09:50:10AM +0200, Aaro Koskinen wrote:
> Commit edf188bee1d9 ("MIPS: Octeon: Remove usage of cvmx_wait()
> everywhere.") deleted cvmx_wait() but forgot to update OCTEON USB
> staging driver. Fix that to allow driver build.
> 
> Fixes: edf188bee1d9 ("MIPS: Octeon: Remove usage of cvmx_wait() everywhere.")
> Signed-off-by: Aaro Koskinen <aaro.koskinen at iki.fi>

Reviewed-by: James Hogan <jhogan at kernel.org>

Should this driver be enabled in the MIPS cavium_octeon_defconfig or
should that not happen until the driver comes out of staging?

Cheers
James

> ---
>  drivers/staging/octeon-usb/octeon-hcd.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c
> index 068aece..cded30f 100644
> --- a/drivers/staging/octeon-usb/octeon-hcd.c
> +++ b/drivers/staging/octeon-usb/octeon-hcd.c
> @@ -394,7 +394,7 @@ struct octeon_hcd {
>  				result = -1;				    \
>  				break;					    \
>  			} else						    \
> -				cvmx_wait(100);				    \
> +				__delay(100);				    \
>  		}							    \
>  	} while (0);							    \
>  	result; })
> @@ -774,7 +774,7 @@ static int cvmx_usb_initialize(struct device *dev,
>  	usbn_clk_ctl.s.hclk_rst = 1;
>  	cvmx_write64_uint64(CVMX_USBNX_CLK_CTL(usb->index), usbn_clk_ctl.u64);
>  	/* 2e.  Wait 64 core-clock cycles for HCLK to stabilize */
> -	cvmx_wait(64);
> +	__delay(64);
>  	/*
>  	 * 3. Program the power-on reset field in the USBN clock-control
>  	 *    register:
> @@ -795,7 +795,7 @@ static int cvmx_usb_initialize(struct device *dev,
>  	cvmx_write64_uint64(CVMX_USBNX_USBP_CTL_STATUS(usb->index),
>  			    usbn_usbp_ctl_status.u64);
>  	/* 6. Wait 10 cycles */
> -	cvmx_wait(10);
> +	__delay(10);
>  	/*
>  	 * 7. Clear ATE_RESET field in the USBN clock-control register:
>  	 *    USBN_USBP_CTL_STATUS[ATE_RESET] = 0
> -- 
> 2.9.2
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/attachments/20171117/2425e9b0/attachment.asc>


More information about the devel mailing list