Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36207 )
Change subject: ec/google/chromeec: Add EC driver support for software sync ......................................................................
Patch Set 13:
(1 comment)
https://review.coreboot.org/c/coreboot/+/36207/13/src/ec/google/chromeec/ec.... File src/ec/google/chromeec/ec.c:
https://review.coreboot.org/c/coreboot/+/36207/13/src/ec/google/chromeec/ec.... PS13, Line 682: EC_VER_FLASH_WRITE
https://review.coreboot.org/c/coreboot/+/36207/7/src/ec/google/chromeec/ec.c... […]
We're doing this as an optional new feature for future Chrome OS boards, we weren't really intending to backport it to any existing ones. Even if you fix this there may be other dependencies hidden somewhere that make it not work on older boards.
That said, if you really want this to support older boards for some reason, I won't object to adding some version fallback code here (although we should make it a little more clever than the depthcharge version... e.g. don't explicitly ask for the version, just try the new one and fall back if it returns EC_RES_INVALID_VERSION, and save that version in a static variable for the next block).
I'm not sure why anyone building "unofficial" images would really want EC software sync though. If you're building your own images you'd presumably just flash the EC once to what you want it to be. Software sync is really just needed when you want automatic updates from somewhere.