Re: [PATCH v6 03/10] clock: Use udelay() to implement mdelay()

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

 



On Wed, 13 Jun 2018 23:27:44 -0700
Andrey Smirnov <andrew.smirnov@xxxxxxxxx> wrote:

> Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx>
> ---
>  common/clock.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/common/clock.c b/common/clock.c
> index f98176dd5..dab6e979f 100644
> --- a/common/clock.c
> +++ b/common/clock.c
> @@ -206,9 +206,11 @@ EXPORT_SYMBOL(udelay);
>  
>  void mdelay(unsigned long msecs)
>  {
> -	uint64_t start = get_time_ns();
> -
> -	while(!is_timeout(start, msecs * MSECOND));
> +	/*
> +	 * Parens around division below are needed to pervent ARM/EABI
                                                      ^^^^^^^  prevent?

> +	 * toolchain from emitting a call to __aeabi_uldivmod.
> +	 */
> +	udelay(msecs * (MSECOND / USECOND));
>  }
>  EXPORT_SYMBOL(mdelay);
>  
> -- 
> 2.17.0
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@xxxxxxxxxxxxxxxxxxx
> http://lists.infradead.org/mailman/listinfo/barebox


-- 
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux