summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/spi/sst.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/spi/sst.c')
-rw-r--r--drivers/mtd/spi/sst.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/mtd/spi/sst.c b/drivers/mtd/spi/sst.c
index 792d04dd2b..4dc2db2ba7 100644
--- a/drivers/mtd/spi/sst.c
+++ b/drivers/mtd/spi/sst.c
@@ -71,6 +71,10 @@ static const struct sst_spi_flash_params sst_spi_flash_table[] = {
.nr_sectors = 1024,
.name = "SST25VF032B",
},{
+ .idcode1 = 0x4b,
+ .nr_sectors = 2048,
+ .name = "SST25VF064C",
+ },{
.idcode1 = 0x01,
.nr_sectors = 16,
.name = "SST25WF512",
@@ -199,10 +203,9 @@ sst_write(struct spi_flash *flash, u32 offset, size_t len, const void *buf)
return ret;
}
-int sst_erase(struct spi_flash *flash, u32 offset, size_t len)
+static int sst_erase(struct spi_flash *flash, u32 offset, size_t len)
{
- return spi_flash_cmd_erase(flash, CMD_SST_SE, SST_SECTOR_SIZE,
- offset, len);
+ return spi_flash_cmd_erase(flash, CMD_SST_SE, offset, len);
}
static int
@@ -256,11 +259,9 @@ spi_flash_probe_sst(struct spi_slave *spi, u8 *idcode)
stm->flash.write = sst_write;
stm->flash.erase = sst_erase;
- stm->flash.size = SST_SECTOR_SIZE * params->nr_sectors;
-
- printf("SF: Detected %s with page size %u, total ",
- params->name, SST_SECTOR_SIZE);
- print_size(stm->flash.size, "\n");
+ stm->flash.read = spi_flash_cmd_read_fast;
+ stm->flash.sector_size = SST_SECTOR_SIZE;
+ stm->flash.size = stm->flash.sector_size * params->nr_sectors;
/* Flash powers up read-only, so clear BP# bits */
sst_unlock(&stm->flash);
OpenPOWER on IntegriCloud