aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd/spi/eon.c
diff options
context:
space:
mode:
authorMike Frysinger2011-01-10 02:20:14 -0500
committerWolfgang Denk2011-04-11 21:00:55 +0200
commita4c3b40b33e41563077ea9ccbae7cac9d26ca38f (patch)
tree9f108ec5820f069a7c790c65aa1df6726f48c9e2 /drivers/mtd/spi/eon.c
parente7b44eddbef88b1a922f8d82088ba236aad01caf (diff)
sf: unify read functions
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'drivers/mtd/spi/eon.c')
-rw-r--r--drivers/mtd/spi/eon.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/drivers/mtd/spi/eon.c b/drivers/mtd/spi/eon.c
index 0c0b05f010d..01caed5abe8 100644
--- a/drivers/mtd/spi/eon.c
+++ b/drivers/mtd/spi/eon.c
@@ -56,26 +56,6 @@ static const struct eon_spi_flash_params eon_spi_flash_table[] = {
},
};
-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 @@ struct spi_flash *spi_flash_probe_eon(struct spi_slave *spi, u8 *idcode)
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;