Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/47276 )
Change subject: WIP: flashrom: import chip restore handler from cros flashrom ......................................................................
Patch Set 2:
(4 comments)
https://review.coreboot.org/c/flashrom/+/47276/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/flashrom/+/47276/2//COMMIT_MSG@7 PS2, Line 7: WIP: flashrom: import chip restore handler from cros flashrom Worth writing out a detailed commit message now about what this infrastructure is and why its needed for s25f variant chips with BUG/BRANCH/TEST lines.
Otherwise I think this architecture looks much better now and looks possible to write a unit-test for!
https://review.coreboot.org/c/flashrom/+/47276/2/flash.h File flash.h:
https://review.coreboot.org/c/flashrom/+/47276/2/flash.h@282 PS2, Line 282: int (*func) (struct flashctx *flash, uint8_t status) typedef this callback signature somewhere sensible above and use that everywhere as the type.
`typedef int (*chip_restore_fn_cb_t)(struct flashctx *flash, uint8_t status);`
https://review.coreboot.org/c/flashrom/+/47276/2/flash.h@360 PS2, Line 360: int (*func) (struct flashctx *flash, uint8_t status), `chip_restore_fn_cb_t func,`
https://review.coreboot.org/c/flashrom/+/47276/2/flashrom.c File flashrom.c:
https://review.coreboot.org/c/flashrom/+/47276/2/flashrom.c@583 PS2, Line 583: int (*func) (struct flashctx *flash, uint8_t status), `chip_restore_fn_cb_t func,`