diff --git a/flash.h b/flash.h
index f73f12e..6ff691a 100644
--- a/flash.h
+++ b/flash.h
@@ -59,18 +59,22 @@
 };
 
 /*
- * The following write granularities are known:
- * - 1 bit: Each bit can be cleared individually.
- * - 1 byte: A byte can be written once. Further writes to an already written byte cause its contents to be
- *   either undefined or to stay unchanged.
- * - 128 bytes: If less than 128 bytes are written, the rest will be erased. Each write to a 128-byte region
- *   will trigger an automatic erase before anything is written. Very uncommon behaviour.
- * - 256 bytes: If less than 256 bytes are written, the contents of the unwritten bytes are undefined.
+ * The following enum defines possible write granularities of flash chips. These tend to reflect the properties
+ * of the actual hardware not necesserily the write function(s) defined by the respective struct flashchip.
+ * The latter might (and should) be more precisely specified, e.g. they might bail out early if their execution
+ * would result in undefined chip contents.
  */
 enum write_granularity {
-	write_gran_256bytes = 0, /* We assume 256 byte granularity by default. */
-	write_gran_1bit,
-	write_gran_1byte,
+	/* We assume 256 byte granularity by default. */
+	write_gran_256bytes = 0,/* If less than 256 bytes are written, the unwritten bytes are undefined. */
+	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_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. */
+	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. */
 };
 
 /*
diff --git a/flashrom.c b/flashrom.c
index 6a117b2..14bb1b3 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -688,6 +688,23 @@
 	return ret;
 }
 
+/* Helper function for need_erase() that focuses on granularities of gran bytes. */
+static int need_erase_gran_bytes(uint8_t *have, uint8_t *want, unsigned int len, unsigned int gran)
+{
+	unsigned int i, j, limit;
+	for (j = 0; j < len / gran; j++) {
+		limit = min (gran, len - j * gran);
+		/* Are 'have' and 'want' identical? */
+		if (!memcmp(have + j * gran, want + j * gran, limit))
+			continue;
+		/* have needs to be in erased state. */
+		for (i = 0; i < limit; i++)
+			if (have[j * gran + i] != 0xff)
+				return 1;
+	}
+	return 0;
+}
+
 /*
  * Check if the buffer @have can be programmed to the content of @want without
  * erasing. This is only possible if all chunks of size @gran are either kept
@@ -705,7 +722,7 @@
 int need_erase(uint8_t *have, uint8_t *want, unsigned int len, enum write_granularity gran)
 {
 	int result = 0;
-	unsigned int i, j, limit;
+	unsigned int i;
 
 	switch (gran) {
 	case write_gran_1bit:
@@ -723,20 +740,22 @@
 			}
 		break;
 	case write_gran_256bytes:
-		for (j = 0; j < len / 256; j++) {
-			limit = min (256, len - j * 256);
-			/* Are 'have' and 'want' identical? */
-			if (!memcmp(have + j * 256, want + j * 256, limit))
-				continue;
-			/* have needs to be in erased state. */
-			for (i = 0; i < limit; i++)
-				if (have[j * 256 + i] != 0xff) {
-					result = 1;
-					break;
-				}
-			if (result)
-				break;
-		}
+		result = need_erase_gran_bytes(have, want, len, 256);
+		break;
+	case write_gran_264bytes:
+		result = need_erase_gran_bytes(have, want, len, 264);
+		break;
+	case write_gran_512bytes:
+		result = need_erase_gran_bytes(have, want, len, 512);
+		break;
+	case write_gran_528bytes:
+		result = need_erase_gran_bytes(have, want, len, 528);
+		break;
+	case write_gran_1024bytes:
+		result = need_erase_gran_bytes(have, want, len, 1024);
+		break;
+	case write_gran_1056bytes:
+		result = need_erase_gran_bytes(have, want, len, 1056);
 		break;
 	default:
 		msg_cerr("%s: Unsupported granularity! Please report a bug at "
@@ -784,6 +803,21 @@
 	case write_gran_256bytes:
 		stride = 256;
 		break;
+	case write_gran_264bytes:
+		stride = 264;
+		break;
+	case write_gran_512bytes:
+		stride = 512;
+		break;
+	case write_gran_528bytes:
+		stride = 528;
+		break;
+	case write_gran_1024bytes:
+		stride = 1024;
+		break;
+	case write_gran_1056bytes:
+		stride = 1056;
+		break;
 	default:
 		msg_cerr("%s: Unsupported granularity! Please report a bug at "
 			 "flashrom@flashrom.org\n", __func__);
