1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-25 04:21:18 +02:00

sf: unify read functions

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
Mike Frysinger
2011-01-10 02:20:14 -05:00
committed by Wolfgang Denk
parent e7b44eddbe
commit a4c3b40b33
9 changed files with 22 additions and 157 deletions

View File

@@ -107,19 +107,6 @@ sst_disable_writing(struct spi_flash *flash)
return ret;
}
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)
{
@@ -269,7 +256,6 @@ spi_flash_probe_sst(struct spi_slave *spi, u8 *idcode)
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 ",