Re: [PATCH v3] riscv: Fix udelay in RV32.

2019-06-11 Thread Paul Walmsley
On Thu, 30 May 2019, Nick Hu wrote: > In RV32, udelay would delay the wrong cycle. When it shifts right > "UDELAY_SHITFT" bits, it either delays 0 cycle or 1 cycle. It only works > correctly in RV64. Because the 'ucycles' always needs to be 64 bits > variable. > > Signed-off-by: Nick Hu > Review

[PATCH v3] riscv: Fix udelay in RV32.

2019-05-30 Thread Nick Hu
In RV32, udelay would delay the wrong cycle. When it shifts right "UDELAY_SHITFT" bits, it either delays 0 cycle or 1 cycle. It only works correctly in RV64. Because the 'ucycles' always needs to be 64 bits variable. Signed-off-by: Nick Hu Reviewed-by: Palmer Dabbelt --- arch/riscv/lib/delay.c