Michał Żygowski has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/55713 )
Change subject: flashrom.c: Add 64KB write granularity ......................................................................
flashrom.c: Add 64KB write granularity
Add 64 KB write granularity for the incoming Embedded Controller of Tuxedo laptops. These ECs can only operate on 64KB blocks and any different operations result in a failure.
Signed-off-by: Michał Żygowski michal.zygowski@3mdeb.com Change-Id: I69801f581d0cb9b85f6596de7e1267ef9317673f --- M flash.h M flashrom.c 2 files changed, 7 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/13/55713/1
diff --git a/flash.h b/flash.h index dd8e156..5f973d0 100644 --- a/flash.h +++ b/flash.h @@ -88,6 +88,7 @@ write_gran_528bytes, /* If less than 528 bytes are written, the unwritten bytes are undefined. */ write_gran_1024bytes, /* If less than 1024 bytes are written, the unwritten bytes are undefined. */ write_gran_1056bytes, /* If less than 1056 bytes are written, the unwritten bytes are undefined. */ + write_gran_64kbytes, /* If less than 64 kbytes are written, the unwritten bytes are undefined. */ write_gran_1byte_implicit_erase, /* EEPROMs and other chips with implicit erase and 1-byte writes. */ };
diff --git a/flashrom.c b/flashrom.c index 90e1864..a1f4710 100644 --- a/flashrom.c +++ b/flashrom.c @@ -502,6 +502,9 @@ case write_gran_1056bytes: result = need_erase_gran_bytes(have, want, len, 1056, erased_value); break; + case write_gran_64kbytes: + result = need_erase_gran_bytes(have, want, len, 1024 * 64, erased_value); + break; case write_gran_1byte_implicit_erase: /* Do not erase, handle content changes from anything->0xff by writing 0xff. */ result = 0; @@ -571,6 +574,9 @@ case write_gran_1056bytes: stride = 1056; break; + case write_gran_64kbytes: + stride = 1024 * 64; + break; default: msg_cerr("%s: Unsupported granularity! Please report a bug at " "flashrom@flashrom.org\n", __func__);