Hi Ryan,
What would be the best solution here? Would it make sense to submit this change for this particular chip? I understand there may also be a speed/wear tradeoff.
I am also interested in the more general case. Do larger erase sizes tend to reprogram a chip faster? If so, why does flashrom not always use the larger sizes?
Flashrom knows the current contents of the flash chip and the new contents that will be programmed. So ideally it should opportunistically use the largest block erase size for any given chunk, whether it's 4KB or 64KB or the entire chip. The work just needs to be done to implement that.
Of course things are never quite that simple and we must also check that it doesn't interfere with chip or programmer enforced write protection. For example if the chip has certain block ranges protected, or in the usual Intel platform case with the flash descriptor regions and permissions (and opmenu stuff).