dediprog: Support long writes of 16MiB and more

Originally, the core of flashprog never sent more than an erase block
at once to write. And with the strategy to use the smallest erase-block
size by default, we never run into any issue with the dediprog driver.
Now that we write bigger chunks at once, after all necessary erasure,
it can be an issue when 16MiB or more are sent.

As all other driver implementations allow arbitrary length writes,
handle this with a simple loop inside the dediprog driver.

Tested with (WIP) SF600Plus-G2 and W25Q128FV.

Change-Id: I9db2d84964dbdfe25dfdb93148f4687a34150bc8
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/98
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
1 file changed