diff options
Diffstat (limited to 'drivers/mtd/spi/atmel.c')
-rw-r--r-- | drivers/mtd/spi/atmel.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/drivers/mtd/spi/atmel.c b/drivers/mtd/spi/atmel.c index 7827b750f6..a9910b11b8 100644 --- a/drivers/mtd/spi/atmel.c +++ b/drivers/mtd/spi/atmel.c @@ -143,20 +143,6 @@ static void at45_build_address(struct atmel_spi_flash *asf, u8 *cmd, u32 offset) 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 @@ struct spi_flash *spi_flash_probe_atmel(struct spi_slave *spi, u8 *idcode) 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 @@ struct spi_flash *spi_flash_probe_atmel(struct spi_slave *spi, u8 *idcode) 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: |