[flashrom] [commit] r1897 - trunk

repository service svn at flashrom.org
Fri Oct 16 04:16:20 CEST 2015


Author: stefanct
Date: Fri Oct 16 04:16:20 2015
New Revision: 1897
URL: http://flashrom.org/trac/flashrom/changeset/1897

Log:
Add support for 128 bytes write granularity.

Some chips such as the ENE KB9012 internal flash require a write
granularity of 128 bytes.

Signed-off-by: Paul Kocialkowski <contact at paulk.fr>
Acked-by: Nico Huber <nico.h at gmx.de>

Modified:
   trunk/flash.h
   trunk/flashrom.c

Modified: trunk/flash.h
==============================================================================
--- trunk/flash.h	Sun Jul  5 18:53:22 2015	(r1896)
+++ trunk/flash.h	Fri Oct 16 04:16:20 2015	(r1897)
@@ -85,6 +85,7 @@
 	write_gran_1bit,	/* Each bit can be cleared individually. */
 	write_gran_1byte,	/* A byte can be written once. Further writes to an already written byte cause
 				 * its contents to be either undefined or to stay unchanged. */
+	write_gran_128bytes,	/* If less than 128 bytes are written, the unwritten bytes are undefined. */
 	write_gran_264bytes,	/* If less than 264 bytes are written, the unwritten bytes are undefined. */
 	write_gran_512bytes,	/* If less than 512 bytes are written, the unwritten bytes are undefined. */
 	write_gran_528bytes,	/* If less than 528 bytes are written, the unwritten bytes are undefined. */

Modified: trunk/flashrom.c
==============================================================================
--- trunk/flashrom.c	Sun Jul  5 18:53:22 2015	(r1896)
+++ trunk/flashrom.c	Fri Oct 16 04:16:20 2015	(r1897)
@@ -781,6 +781,9 @@
 				break;
 			}
 		break;
+	case write_gran_128bytes:
+		result = need_erase_gran_bytes(have, want, len, 128);
+		break;
 	case write_gran_256bytes:
 		result = need_erase_gran_bytes(have, want, len, 256);
 		break;
@@ -847,6 +850,9 @@
 	case write_gran_1byte_implicit_erase:
 		stride = 1;
 		break;
+	case write_gran_128bytes:
+		stride = 128;
+		break;
 	case write_gran_256bytes:
 		stride = 256;
 		break;




More information about the flashrom mailing list