diff --git a/drivers/mtd/spi/atmel.c b/drivers/mtd/spi/atmel.c
index 7827b75..a9910b1 100644
--- a/drivers/mtd/spi/atmel.c
+++ b/drivers/mtd/spi/atmel.c
@@ -143,20 +143,6 @@
 	cmd[2] = byte_addr;
 }
 
-static int dataflash_read_fast_p2(struct spi_flash *flash,
-		u32 offset, size_t len, void *buf)
-{
-	u8 cmd[5];
-
-	cmd[0] = CMD_READ_ARRAY_FAST;
-	cmd[1] = offset >> 16;
-	cmd[2] = offset >> 8;
-	cmd[3] = offset;
-	cmd[4] = 0x00;
-
-	return spi_flash_read_common(flash, cmd, sizeof(cmd), buf, len);
-}
-
 static int dataflash_read_fast_at45(struct spi_flash *flash,
 		u32 offset, size_t len, void *buf)
 {
@@ -492,7 +478,7 @@
 			asf->flash.erase = dataflash_erase_at45;
 			page_size += 1 << (params->l2_page_size - 5);
 		} else {
-			asf->flash.read = dataflash_read_fast_p2;
+			asf->flash.read = spi_flash_cmd_read_fast;
 			asf->flash.write = dataflash_write_p2;
 			asf->flash.erase = dataflash_erase_p2;
 		}
@@ -501,7 +487,7 @@
 
 	case DF_FAMILY_AT26F:
 	case DF_FAMILY_AT26DF:
-		asf->flash.read = dataflash_read_fast_p2;
+		asf->flash.read = spi_flash_cmd_read_fast;
 		break;
 
 	default:
diff --git a/drivers/mtd/spi/eon.c b/drivers/mtd/spi/eon.c
index 0c0b05f..01caed5 100644
--- a/drivers/mtd/spi/eon.c
+++ b/drivers/mtd/spi/eon.c
@@ -56,26 +56,6 @@
 	},
 };
 
-static int eon_read_fast(struct spi_flash *flash,
-			 u32 offset, size_t len, void *buf)
-{
-	struct eon_spi_flash *eon = to_eon_spi_flash(flash);
-	unsigned long page_addr;
-	unsigned long page_size;
-	u8 cmd[5];
-
-	page_size = eon->params->page_size;
-	page_addr = offset / page_size;
-
-	cmd[0] = CMD_READ_ARRAY_FAST;
-	cmd[1] = page_addr >> 8;
-	cmd[2] = page_addr;
-	cmd[3] = offset % page_size;
-	cmd[4] = 0x00;
-
-	return spi_flash_read_common(flash, cmd, sizeof(cmd), buf, len);
-}
-
 static int eon_write(struct spi_flash *flash,
 		     u32 offset, size_t len, const void *buf)
 {
@@ -177,7 +157,7 @@
 
 	eon->flash.write = eon_write;
 	eon->flash.erase = eon_erase;
-	eon->flash.read = eon_read_fast;
+	eon->flash.read = spi_flash_cmd_read_fast;
 	eon->flash.size = params->page_size * params->pages_per_sector
 	    * params->nr_sectors;
 
diff --git a/drivers/mtd/spi/macronix.c b/drivers/mtd/spi/macronix.c
index 573e1db..4155d4d 100644
--- a/drivers/mtd/spi/macronix.c
+++ b/drivers/mtd/spi/macronix.c
@@ -112,26 +112,6 @@
 	},
 };
 
-static int macronix_read_fast(struct spi_flash *flash,
-			      u32 offset, size_t len, void *buf)
-{
-	struct macronix_spi_flash *mcx = to_macronix_spi_flash(flash);
-	unsigned long page_addr;
-	unsigned long page_size;
-	u8 cmd[5];
-
-	page_size = mcx->params->page_size;
-	page_addr = offset / page_size;
-
-	cmd[0] = CMD_READ_ARRAY_FAST;
-	cmd[1] = page_addr >> 8;
-	cmd[2] = page_addr;
-	cmd[3] = offset % page_size;
-	cmd[4] = 0x00;
-
-	return spi_flash_read_common(flash, cmd, sizeof(cmd), buf, len);
-}
-
 static int macronix_write(struct spi_flash *flash,
 			  u32 offset, size_t len, const void *buf)
 {
@@ -234,7 +214,7 @@
 
 	mcx->flash.write = macronix_write;
 	mcx->flash.erase = macronix_erase;
-	mcx->flash.read = macronix_read_fast;
+	mcx->flash.read = spi_flash_cmd_read_fast;
 	mcx->flash.size = params->page_size * params->pages_per_sector
 	    * params->sectors_per_block * params->nr_blocks;
 
diff --git a/drivers/mtd/spi/spansion.c b/drivers/mtd/spi/spansion.c
index be4fc67..d54a5fa 100644
--- a/drivers/mtd/spi/spansion.c
+++ b/drivers/mtd/spi/spansion.c
@@ -133,30 +133,6 @@
 	},
 };
 
-static int spansion_read_fast(struct spi_flash *flash,
-			     u32 offset, size_t len, void *buf)
-{
-	struct spansion_spi_flash *spsn = to_spansion_spi_flash(flash);
-	unsigned long page_addr;
-	unsigned long page_size;
-	u8 cmd[5];
-
-	page_size = spsn->params->page_size;
-	page_addr = offset / page_size;
-
-	cmd[0] = CMD_READ_ARRAY_FAST;
-	cmd[1] = page_addr >> 8;
-	cmd[2] = page_addr;
-	cmd[3] = offset % page_size;
-	cmd[4] = 0x00;
-
-	debug
-		("READ: 0x%x => cmd = { 0x%02x 0x%02x%02x%02x%02x } len = 0x%x\n",
-		 offset, cmd[0], cmd[1], cmd[2], cmd[3], cmd[4], len);
-
-	return spi_flash_read_common(flash, cmd, sizeof(cmd), buf, len);
-}
-
 static int spansion_write(struct spi_flash *flash,
 			 u32 offset, size_t len, const void *buf)
 {
@@ -263,7 +239,7 @@
 
 	spsn->flash.write = spansion_write;
 	spsn->flash.erase = spansion_erase;
-	spsn->flash.read = spansion_read_fast;
+	spsn->flash.read = spi_flash_cmd_read_fast;
 	spsn->flash.size = params->page_size * params->pages_per_sector
 	    * params->nr_sectors;
 
diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c
index ca4bbb2..5c261f1 100644
--- a/drivers/mtd/spi/spi_flash.c
+++ b/drivers/mtd/spi/spi_flash.c
@@ -77,6 +77,18 @@
 	return ret;
 }
 
+int spi_flash_cmd_read_fast(struct spi_flash *flash, u32 offset,
+		size_t len, void *data)
+{
+	u8 cmd[5];
+
+	cmd[0] = CMD_READ_ARRAY_FAST;
+	spi_flash_addr(offset, cmd);
+	cmd[4] = 0x00;
+
+	return spi_flash_read_common(flash, cmd, sizeof(cmd), data, len);
+}
+
 int spi_flash_cmd_poll_bit(struct spi_flash *flash, unsigned long timeout,
 			   u8 cmd, u8 poll_bit)
 {
diff --git a/drivers/mtd/spi/spi_flash_internal.h b/drivers/mtd/spi/spi_flash_internal.h
index 114b634..d7bcd6d 100644
--- a/drivers/mtd/spi/spi_flash_internal.h
+++ b/drivers/mtd/spi/spi_flash_internal.h
@@ -35,6 +35,9 @@
 int spi_flash_cmd_read(struct spi_slave *spi, const u8 *cmd,
 		size_t cmd_len, void *data, size_t data_len);
 
+int spi_flash_cmd_read_fast(struct spi_flash *flash, u32 offset,
+		size_t len, void *data);
+
 /*
  * Send a multi-byte command to the device followed by (optional)
  * data. Used for programming the flash array, etc.
diff --git a/drivers/mtd/spi/sst.c b/drivers/mtd/spi/sst.c
index d550550..792d04d 100644
--- a/drivers/mtd/spi/sst.c
+++ b/drivers/mtd/spi/sst.c
@@ -108,19 +108,6 @@
 }
 
 static int
-sst_read_fast(struct spi_flash *flash, u32 offset, size_t len, void *buf)
-{
-	u8 cmd[5] = {
-		CMD_READ_ARRAY_FAST,
-		offset >> 16,
-		offset >> 8,
-		offset,
-		0x00,
-	};
-	return spi_flash_read_common(flash, cmd, sizeof(cmd), buf, len);
-}
-
-static int
 sst_byte_write(struct spi_flash *flash, u32 offset, const void *buf)
 {
 	int ret;
@@ -269,7 +256,6 @@
 
 	stm->flash.write = sst_write;
 	stm->flash.erase = sst_erase;
-	stm->flash.read = sst_read_fast;
 	stm->flash.size = SST_SECTOR_SIZE * params->nr_sectors;
 
 	printf("SF: Detected %s with page size %u, total ",
diff --git a/drivers/mtd/spi/stmicro.c b/drivers/mtd/spi/stmicro.c
index 494005c..7ef690d 100644
--- a/drivers/mtd/spi/stmicro.c
+++ b/drivers/mtd/spi/stmicro.c
@@ -134,26 +134,6 @@
 	},
 };
 
-static int stmicro_read_fast(struct spi_flash *flash,
-			     u32 offset, size_t len, void *buf)
-{
-	struct stmicro_spi_flash *stm = to_stmicro_spi_flash(flash);
-	unsigned long page_addr;
-	unsigned long page_size;
-	u8 cmd[5];
-
-	page_size = stm->params->page_size;
-	page_addr = offset / page_size;
-
-	cmd[0] = CMD_READ_ARRAY_FAST;
-	cmd[1] = page_addr >> 8;
-	cmd[2] = page_addr;
-	cmd[3] = offset % page_size;
-	cmd[4] = 0x00;
-
-	return spi_flash_read_common(flash, cmd, sizeof(cmd), buf, len);
-}
-
 static int stmicro_write(struct spi_flash *flash,
 			 u32 offset, size_t len, const void *buf)
 {
@@ -268,7 +248,7 @@
 
 	stm->flash.write = stmicro_write;
 	stm->flash.erase = stmicro_erase;
-	stm->flash.read = stmicro_read_fast;
+	stm->flash.read = spi_flash_cmd_read_fast;
 	stm->flash.size = params->page_size * params->pages_per_sector
 	    * params->nr_sectors;
 
diff --git a/drivers/mtd/spi/winbond.c b/drivers/mtd/spi/winbond.c
index 8470a82..e88802f 100644
--- a/drivers/mtd/spi/winbond.c
+++ b/drivers/mtd/spi/winbond.c
@@ -105,44 +105,6 @@
 	},
 };
 
-/*
- * Assemble the address part of a command for Winbond devices in
- * non-power-of-two page size mode.
- */
-static void winbond_build_address(struct winbond_spi_flash *stm, u8 *cmd, u32 offset)
-{
-	unsigned long page_addr;
-	unsigned long byte_addr;
-	unsigned long page_size;
-	unsigned int page_shift;
-
-	/*
-	 * The "extra" space per page is the power-of-two page size
-	 * divided by 32.
-	 */
-	page_shift = stm->params->l2_page_size;
-	page_size = (1 << page_shift);
-	page_addr = offset / page_size;
-	byte_addr = offset % page_size;
-
-	cmd[0] = page_addr >> (16 - page_shift);
-	cmd[1] = page_addr << (page_shift - 8) | (byte_addr >> 8);
-	cmd[2] = byte_addr;
-}
-
-static int winbond_read_fast(struct spi_flash *flash,
-		u32 offset, size_t len, void *buf)
-{
-	struct winbond_spi_flash *stm = to_winbond_spi_flash(flash);
-	u8 cmd[5];
-
-	cmd[0] = CMD_READ_ARRAY_FAST;
-	winbond_build_address(stm, cmd + 1, offset);
-	cmd[4] = 0x00;
-
-	return spi_flash_read_common(flash, cmd, sizeof(cmd), buf, len);
-}
-
 static int winbond_write(struct spi_flash *flash,
 		u32 offset, size_t len, const void *buf)
 {
@@ -250,7 +212,7 @@
 
 	stm->flash.write = winbond_write;
 	stm->flash.erase = winbond_erase;
-	stm->flash.read = winbond_read_fast;
+	stm->flash.read = spi_flash_cmd_read_fast;
 	stm->flash.size = page_size * params->pages_per_sector
 				* params->sectors_per_block
 				* params->nr_blocks;
