diff --git a/chipdrivers.h b/chipdrivers.h
index adcb46d..4456204 100644
--- a/chipdrivers.h
+++ b/chipdrivers.h
@@ -76,7 +76,6 @@
 uint8_t oddparity(uint8_t val);
 void toggle_ready_jedec(chipaddr dst);
 void data_polling_jedec(chipaddr dst, uint8_t data);
-void start_program_jedec(chipaddr bios);
 int write_byte_program_jedec(chipaddr bios, uint8_t *src,
 			     chipaddr dst);
 int probe_jedec(struct flashchip *flash);
@@ -86,8 +85,7 @@
 int erase_sector_jedec(struct flashchip *flash, unsigned int page, unsigned int pagesize);
 int erase_block_jedec(struct flashchip *flash, unsigned int page, unsigned int blocksize);
 int erase_chip_block_jedec(struct flashchip *flash, unsigned int page, unsigned int blocksize);
-int write_sector_jedec(chipaddr bios, uint8_t *src,
-		       chipaddr dst, unsigned int page_size);
+int write_sector_jedec_common(struct flashchip *flash, uint8_t *src, chipaddr dst, unsigned int page_size, unsigned int mask);
 
 /* m29f002.c */
 int erase_m29f002(struct flashchip *flash);
diff --git a/flash.h b/flash.h
index feac98e..4d1d6b6 100644
--- a/flash.h
+++ b/flash.h
@@ -144,6 +144,9 @@
  */
 #define NUM_ERASEFUNCTIONS 5
 
+#define FEATURE_REGISTERMAP (1 << 0)
+#define FEATURE_BYTEWRITES (1 << 1)
+
 struct flashchip {
 	const char *vendor;
 	const char *name;
@@ -160,6 +163,7 @@
 
 	int total_size;
 	int page_size;
+	int feature_bits;
 
 	/*
 	 * Indicate if flashrom has been tested with this flash chip and if
diff --git a/flashchips.c b/flashchips.c
index 59f9139..50a1226 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -5,6 +5,7 @@
  * Copyright (C) 2004 Tyan Corp
  * Copyright (C) 2005-2008 coresystems GmbH <stepan@openbios.org>
  * Copyright (C) 2006-2009 Carl-Daniel Hailfinger
+ * Copyright (C) 2009 Sean Nelson <audiohacked@gmail.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff --git a/jedec.c b/jedec.c
index d6cad41..e1bd12f 100644
--- a/jedec.c
+++ b/jedec.c
@@ -5,6 +5,7 @@
  * Copyright (C) 2006 Giampiero Giancipoli <gianci@email.it>
  * Copyright (C) 2006 coresystems GmbH <info@coresystems.de>
  * Copyright (C) 2007 Carl-Daniel Hailfinger
+ * Copyright (C) 2009 Sean Nelson <audiohacked@gmail.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -24,6 +25,8 @@
 #include "flash.h"
 
 #define MAX_REFLASH_TRIES 0x10
+#define MASK_FULL 0xffff
+#define MASK_2AA 0x7ff
 
 /* Check one byte for odd parity */
 uint8_t oddparity(uint8_t val)
@@ -87,14 +90,16 @@
 		printf_debug("%s: excessive loops, i=0x%x\n", __func__, i);
 }
 
-void start_program_jedec(chipaddr bios)
+void start_program_jedec_common(struct flashchip *flash, unsigned int mask)
 {
-	chip_writeb(0xAA, bios + 0x5555);
-	chip_writeb(0x55, bios + 0x2AAA);
-	chip_writeb(0xA0, bios + 0x5555);
+	chipaddr bios = flash->virtual_memory;
+	chip_writeb(0xAA, bios + (0x5555 & mask));
+	chip_writeb(0x55, bios + (0x2AAA & mask));
+	chip_writeb(0xA0, bios + (0x5555 & mask));
 }
 
-int probe_jedec(struct flashchip *flash)
+int probe_jedec_common(struct flashchip *flash,
+			unsigned int mask, int long_reset)
 {
 	chipaddr bios = flash->virtual_memory;
 	uint8_t id1, id2;
@@ -118,13 +123,13 @@
 	}
 
 	/* Issue JEDEC Product ID Entry command */
-	chip_writeb(0xAA, bios + 0x5555);
+	chip_writeb(0xAA, bios + (0x5555 & mask));
 	if (probe_timing_enter)
 		programmer_delay(10);
-	chip_writeb(0x55, bios + 0x2AAA);
+	chip_writeb(0x55, bios + (0x2AAA & mask));
 	if (probe_timing_enter)
 		programmer_delay(10);
-	chip_writeb(0x90, bios + 0x5555);
+	chip_writeb(0x90, bios + (0x5555 & mask));
 	if (probe_timing_enter)
 		programmer_delay(probe_timing_enter);
 
@@ -147,13 +152,16 @@
 	}
 
 	/* Issue JEDEC Product ID Exit command */
-	chip_writeb(0xAA, bios + 0x5555);
-	if (probe_timing_exit)
-		programmer_delay(10);
-	chip_writeb(0x55, bios + 0x2AAA);
-	if (probe_timing_exit)
-		programmer_delay(10);
-	chip_writeb(0xF0, bios + 0x5555);
+	if (long_reset)
+	{
+		chip_writeb(0xAA, bios + (0x5555 & mask));
+		if (probe_timing_exit)
+			programmer_delay(10);
+		chip_writeb(0x55, bios + (0x2AAA & mask));
+		if (probe_timing_exit)
+			programmer_delay(10);
+	}
+	chip_writeb(0xF0, bios + (0x5555 & mask));
 	if (probe_timing_exit)
 		programmer_delay(probe_timing_exit);
 
@@ -184,24 +192,28 @@
 	if (largeid1 == flash->manufacture_id && largeid2 == flash->model_id)
 		return 1;
 
+	if (flash->feature_bits & FEATURE_REGISTERMAP)
+		map_flash_registers(flash);
+
 	return 0;
 }
 
-int erase_sector_jedec(struct flashchip *flash, unsigned int page, unsigned int pagesize)
+int erase_sector_jedec_common(struct flashchip *flash, unsigned int page,
+			      unsigned int pagesize, unsigned int mask)
 {
 	chipaddr bios = flash->virtual_memory;
 
 	/*  Issue the Sector Erase command   */
-	chip_writeb(0xAA, bios + 0x5555);
+	chip_writeb(0xAA, bios + (0x5555 & mask));
 	programmer_delay(10);
-	chip_writeb(0x55, bios + 0x2AAA);
+	chip_writeb(0x55, bios + (0x2AAA & mask));
 	programmer_delay(10);
-	chip_writeb(0x80, bios + 0x5555);
+	chip_writeb(0x80, bios + (0x5555 & mask));
 	programmer_delay(10);
 
-	chip_writeb(0xAA, bios + 0x5555);
+	chip_writeb(0xAA, bios + (0x5555 & mask));
 	programmer_delay(10);
-	chip_writeb(0x55, bios + 0x2AAA);
+	chip_writeb(0x55, bios + (0x2AAA & mask));
 	programmer_delay(10);
 	chip_writeb(0x30, bios + page);
 	programmer_delay(10);
@@ -216,21 +228,22 @@
 	return 0;
 }
 
-int erase_block_jedec(struct flashchip *flash, unsigned int block, unsigned int blocksize)
+int erase_block_jedec_common(struct flashchip *flash, unsigned int block,
+			     unsigned int blocksize, unsigned int mask)
 {
 	chipaddr bios = flash->virtual_memory;
 
 	/*  Issue the Sector Erase command   */
-	chip_writeb(0xAA, bios + 0x5555);
+	chip_writeb(0xAA, bios + (0x5555 & mask));
 	programmer_delay(10);
-	chip_writeb(0x55, bios + 0x2AAA);
+	chip_writeb(0x55, bios + (0x2AAA & mask));
 	programmer_delay(10);
-	chip_writeb(0x80, bios + 0x5555);
+	chip_writeb(0x80, bios + (0x5555 & mask));
 	programmer_delay(10);
 
-	chip_writeb(0xAA, bios + 0x5555);
+	chip_writeb(0xAA, bios + (0x5555 & mask));
 	programmer_delay(10);
-	chip_writeb(0x55, bios + 0x2AAA);
+	chip_writeb(0x55, bios + (0x2AAA & mask));
 	programmer_delay(10);
 	chip_writeb(0x50, bios + block);
 	programmer_delay(10);
@@ -245,35 +258,24 @@
 	return 0;
 }
 
-/* erase chip with block_erase() prototype */
-int erase_chip_block_jedec(struct flashchip *flash, unsigned int addr, unsigned int blocksize)
-{
-	if ((addr != 0) || (blocksize != flash->total_size * 1024)) {
-		fprintf(stderr, "%s called with incorrect arguments\n",
-			__func__);
-		return -1;
-	}
-	return erase_chip_jedec(flash);
-}
-
-int erase_chip_jedec(struct flashchip *flash)
+int erase_chip_jedec_common(struct flashchip *flash, unsigned int mask)
 {
 	int total_size = flash->total_size * 1024;
 	chipaddr bios = flash->virtual_memory;
 
 	/*  Issue the JEDEC Chip Erase command   */
-	chip_writeb(0xAA, bios + 0x5555);
+	chip_writeb(0xAA, bios + (0x5555 & mask));
 	programmer_delay(10);
-	chip_writeb(0x55, bios + 0x2AAA);
+	chip_writeb(0x55, bios + (0x2AAA & mask));
 	programmer_delay(10);
-	chip_writeb(0x80, bios + 0x5555);
+	chip_writeb(0x80, bios + (0x5555 & mask));
 	programmer_delay(10);
 
-	chip_writeb(0xAA, bios + 0x5555);
+	chip_writeb(0xAA, bios + (0x5555 & mask));
 	programmer_delay(10);
-	chip_writeb(0x55, bios + 0x2AAA);
+	chip_writeb(0x55, bios + (0x2AAA & mask));
 	programmer_delay(10);
-	chip_writeb(0x10, bios + 0x5555);
+	chip_writeb(0x10, bios + (0x5555 & mask));
 	programmer_delay(10);
 
 	toggle_ready_jedec_slow(bios);
@@ -285,8 +287,55 @@
 	return 0;
 }
 
-int write_page_write_jedec(struct flashchip *flash, uint8_t *src,
-			   int start, int page_size)
+int write_byte_program_jedec_common(struct flashchip *flash, uint8_t *src,
+			     chipaddr dst, unsigned int mask)
+{
+	int tried = 0, failed = 0;
+	chipaddr bios = flash->virtual_memory;
+
+	/* If the data is 0xFF, don't program it and don't complain. */
+	if (*src == 0xFF) {
+		return 0;
+	}
+
+retry:
+	/* Issue JEDEC Byte Program command */
+	start_program_jedec_common(flash, mask);
+
+	/* transfer data from source to destination */
+	chip_writeb(*src, dst);
+	toggle_ready_jedec(bios);
+
+	if (chip_readb(dst) != *src && tried++ < MAX_REFLASH_TRIES) {
+		goto retry;
+	}
+
+	if (tried >= MAX_REFLASH_TRIES)
+		failed = 1;
+
+	return failed;
+}
+
+int write_sector_jedec_common(struct flashchip *flash, uint8_t *src,
+		       chipaddr dst, unsigned int page_size, unsigned int mask)
+{
+	int i, failed = 0;
+	chipaddr olddst;
+
+	olddst = dst;
+	for (i = 0; i < page_size; i++) {
+		if (write_byte_program_jedec_common(flash, src, dst, mask))
+			failed = 1;
+		dst++, src++;
+	}
+	if (failed)
+		fprintf(stderr, " writing sector at 0x%lx failed!\n", olddst);
+
+	return failed;
+}
+
+int write_page_write_jedec_common(struct flashchip *flash, uint8_t *src,
+			   int start, int page_size, unsigned int mask)
 {
 	int i, tried = 0, failed;
 	uint8_t *s = src;
@@ -295,8 +344,8 @@
 	chipaddr d = dst;
 
 retry:
-	/* Issue JEDEC Data Unprotect comand */
-	start_program_jedec(bios);
+	/* Issue JEDEC Start Program comand */
+	start_program_jedec_common(flash, mask);
 
 	/* transfer data from source to destination */
 	for (i = 0; i < page_size; i++) {
@@ -324,52 +373,6 @@
 	return failed;
 }
 
-int write_byte_program_jedec(chipaddr bios, uint8_t *src,
-			     chipaddr dst)
-{
-	int tried = 0, failed = 0;
-
-	/* If the data is 0xFF, don't program it and don't complain. */
-	if (*src == 0xFF) {
-		return 0;
-	}
-
-retry:
-	/* Issue JEDEC Byte Program command */
-	start_program_jedec(bios);
-
-	/* transfer data from source to destination */
-	chip_writeb(*src, dst);
-	toggle_ready_jedec(bios);
-
-	if (chip_readb(dst) != *src && tried++ < MAX_REFLASH_TRIES) {
-		goto retry;
-	}
-
-	if (tried >= MAX_REFLASH_TRIES)
-		failed = 1;
-
-	return failed;
-}
-
-int write_sector_jedec(chipaddr bios, uint8_t *src,
-		       chipaddr dst, unsigned int page_size)
-{
-	int i, failed = 0;
-	chipaddr olddst;
-
-	olddst = dst;
-	for (i = 0; i < page_size; i++) {
-		if (write_byte_program_jedec(bios, src, dst))
-			failed = 1;
-		dst++, src++;
-	}
-	if (failed)
-		fprintf(stderr, " writing sector at 0x%lx failed!\n", olddst);
-
-	return failed;
-}
-
 int write_jedec(struct flashchip *flash, uint8_t *buf)
 {
 	int i, failed = 0;
@@ -384,8 +387,8 @@
 	printf("Programming page: ");
 	for (i = 0; i < total_size / page_size; i++) {
 		printf("%04d at address: 0x%08x", i, i * page_size);
-		if (write_page_write_jedec(flash, buf + i * page_size,
-					   i * page_size, page_size))
+		if (write_page_write_jedec_common(flash, buf + i * page_size,
+					   i * page_size, page_size, MASK_FULL))
 			failed = 1;
 		printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
 	}
@@ -411,7 +414,7 @@
 		if ((i & 0x3) == 0)
 			printf("address: 0x%08lx", (unsigned long)i * 1024);
 
-                write_sector_jedec(bios, buf + i * 1024, dst + i * 1024, 1024);
+                write_sector_jedec_common(flash, buf + i * 1024, dst + i * 1024, 1024, MASK_FULL);
 
 		if ((i & 0x3) == 0)
 			printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
@@ -420,3 +423,35 @@
 	printf("\n");
 	return 0;
 }
+
+/* erase chip with block_erase() prototype */
+int erase_chip_block_jedec(struct flashchip *flash, unsigned int addr,
+			   unsigned int blocksize)
+{
+	if ((addr != 0) || (blocksize != flash->total_size * 1024)) {
+		fprintf(stderr, "%s called with incorrect arguments\n",
+			__func__);
+		return -1;
+	}
+	return erase_chip_jedec_common(flash, MASK_FULL);
+}
+
+int probe_jedec(struct flashchip *flash)
+{
+	return probe_jedec_common(flash, MASK_FULL, 1);
+}
+
+int erase_sector_jedec(struct flashchip *flash, unsigned int page, unsigned int size)
+{
+	return erase_sector_jedec_common(flash, page, size, MASK_FULL);
+}
+
+int erase_block_jedec(struct flashchip *flash, unsigned int page, unsigned int size)
+{
+	return erase_block_jedec_common(flash, page, size, MASK_FULL);
+}
+
+int erase_chip_jedec(struct flashchip *flash)
+{
+	return erase_chip_jedec_common(flash, MASK_FULL);
+}
diff --git a/pm49fl00x.c b/pm49fl00x.c
index 27a1163..424b0ed 100644
--- a/pm49fl00x.c
+++ b/pm49fl00x.c
@@ -101,8 +101,8 @@
 
 		/* write to the sector */
 		printf("%04d at address: 0x%08x", i, i * page_size);
-		write_sector_jedec(bios, buf + i * page_size,
-				   bios + i * page_size, page_size);
+		write_sector_jedec_common(flash, buf + i * page_size,
+				   bios + i * page_size, page_size, 0xffff);
 		printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
 		fflush(stdout);
 	}
diff --git a/sst49lf040.c b/sst49lf040.c
index ab1c918..c91a139 100644
--- a/sst49lf040.c
+++ b/sst49lf040.c
@@ -59,8 +59,8 @@
 		if (i % 10 == 0)
 			printf("%04d at address: 0x%08x ", i, i * page_size);
 
-		write_sector_jedec(bios, buf + i * page_size,
-				   bios + i * page_size, page_size);
+		write_sector_jedec_common(flash, buf + i * page_size,
+				   bios + i * page_size, page_size, 0xffff);
 
 		if (i % 10 == 0)
 			printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
diff --git a/sst_fwhub.c b/sst_fwhub.c
index f09aa54..4a976e6 100644
--- a/sst_fwhub.c
+++ b/sst_fwhub.c
@@ -157,8 +157,8 @@
 						   page_size);
 			if (rc)
 				return 1;
-			write_sector_jedec(bios, buf + i * page_size,
-					   bios + i * page_size, page_size);
+			write_sector_jedec_common(flash, buf + i * page_size,
+					   bios + i * page_size, page_size, 0xffff);
 		}
 		printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
 	}
diff --git a/w39v040c.c b/w39v040c.c
index 722ae29..66ab115 100644
--- a/w39v040c.c
+++ b/w39v040c.c
@@ -80,8 +80,8 @@
 	printf("Programming page: ");
 	for (i = 0; i < total_size / page_size; i++) {
 		printf("%04d at address: 0x%08x", i, i * page_size);
-		write_sector_jedec(bios, buf + i * page_size,
-				   bios + i * page_size, page_size);
+		write_sector_jedec_common(flash, buf + i * page_size,
+				   bios + i * page_size, page_size, 0xffff);
 		printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
 	}
 	printf("\n");
diff --git a/w39v080fa.c b/w39v080fa.c
index 580657f..311e55b 100644
--- a/w39v080fa.c
+++ b/w39v080fa.c
@@ -182,7 +182,7 @@
 	printf("Programming: ");
 	for (i = 0; i < total_size; i += flash->page_size) {
 		printf("0x%08x\b\b\b\b\b\b\b\b\b\b", i);
-		write_sector_jedec(bios, buf + i, bios + i, flash->page_size);
+		write_sector_jedec_common(flash, buf + i, bios + i, flash->page_size, 0xffff);
 	}
 	printf("\n");
 
diff --git a/w49f002u.c b/w49f002u.c
index d12bc72..87ce000 100644
--- a/w49f002u.c
+++ b/w49f002u.c
@@ -36,8 +36,8 @@
 	for (i = 0; i < total_size / page_size; i++) {
 		printf("%04d at address: 0x%08x ", i, i * page_size);
 		/* Byte-wise writing of 'page_size' bytes. */
-		write_sector_jedec(bios, buf + i * page_size,
-				   bios + i * page_size, page_size);
+		write_sector_jedec_common(flash, buf + i * page_size,
+				   bios + i * page_size, page_size, 0xffff);
 		printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
 		fflush(stdout);
 	}
