Skip to content
Commit c3c9a2c4 authored by Luca Ellero's avatar Luca Ellero Committed by Boris Brezillon
Browse files

mtd: dataflash: replace msleep with usleep_range



Since msleep is based on jiffies, this 3 ms sleep becomes actually 20 ms.
Worst of all, since this sleep is used in a loop when writing, a single page
write (256 to 1024 bytes) causes 17 ms extra time.
When writing large files (for example u-boot is usually 512 KB) this delay
adds up to minutes.
See Documentation/timers/timers-howto.txt "Why not msleep for (1ms - 20ms)".

Signed-off-by: default avatarLuca Ellero <luca.ellero@brickedbrain.com>
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@bootlin.com>
parent 0e210b54
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