No. But can you maybe build a list of erase commands to be executed once[...]It will be great if we can do this without having performance penalties.
Shouldn't we fail up front instead ?Is this possible? In non-overlaid regions, the address is aligned with+ while (len) {What would happen if you realize mid-way that you cannot erase some
+ cmd = spi_nor_find_best_erase_cmd(map, region, addr, len);
+ if (!cmd)
+ return -EINVAL;
sector , do you end up with partial erase ?
at least one of the erase commands, else -EINVAL. For overlaid regions
alignment doesn't matter. But yes, if this is possible, in this case,
this proposal will do a partial erase.
Can we loose the conditions for the last erase command? If one wants to
erase 80k chunk starting from offset 0 and only 32k and 64k erase type
are supported, can we erase 96k?
you validate that the erase can be performed for example ?