Skip to content
Commit b71f312e authored by Nick Hu's avatar Nick Hu Committed by Greg Kroah-Hartman
Browse files

riscv: Fix udelay in RV32.



[ Upstream commit d0e1f211 ]

In RV32, udelay would delay the wrong cycle. When it shifts right
"UDELAY_SHIFT" 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: default avatarNick Hu <nickhu@andestech.com>
Reviewed-by: default avatarPalmer Dabbelt <palmer@sifive.com>
[paul.walmsley@sifive.com: fixed minor spelling error]
Signed-off-by: default avatarPaul Walmsley <paul.walmsley@sifive.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 122c6a71
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment