Skip to content
Commit 6534e680 authored by Bean Huo's avatar Bean Huo Committed by Brian Norris
Browse files

mtd: cfi_cmdset_0002: fix do_write_buffer() timeout error



For some NOR flashes, the size of the buffer program has been increased
from 256 bytes to 512 bytes, and so 2ms maximum timeout can may not be
sufficient for all different vendor's NOR flash. There is maximum
timeout information in the CFI area, so we instead of picking a fixed
value, we can calculate this according to the standard CFI parameters
parsed at probe time. If we haven't probed this information, or it is
smaller than 2000us, then specify a minimum value 2000us.

Tested with Micron JS28F512M29EWx and Micron MT28EW512ABA flash devices.

Signed-off-by: default avatarBean Huo <beanhuo@outlook.com>
[Brian: fix up comments, use 'max()']
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent d68a5c3d
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