summaryrefslogtreecommitdiff
path: root/src/drivers/spi/spansion.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/spi/spansion.c')
-rw-r--r--src/drivers/spi/spansion.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/drivers/spi/spansion.c b/src/drivers/spi/spansion.c
index d7cca3ffae..6dd703c7ce 100644
--- a/src/drivers/spi/spansion.c
+++ b/src/drivers/spi/spansion.c
@@ -267,11 +267,6 @@ static int spansion_write(struct spi_flash *flash,
return ret;
}
-static int spansion_erase(struct spi_flash *flash, u32 offset, size_t len)
-{
- return spi_flash_cmd_erase(flash, CMD_S25FLXX_SE, offset, len);
-}
-
static struct spansion_spi_flash spsn_flash;
struct spi_flash *spi_flash_probe_spansion(struct spi_slave *spi, u8 *idcode)
@@ -300,10 +295,11 @@ struct spi_flash *spi_flash_probe_spansion(struct spi_slave *spi, u8 *idcode)
spsn->flash.name = params->name;
spsn->flash.write = spansion_write;
- spsn->flash.erase = spansion_erase;
+ spsn->flash.erase = spi_flash_cmd_erase;
spsn->flash.read = spi_flash_cmd_read_slow;
spsn->flash.sector_size = params->page_size * params->pages_per_sector;
spsn->flash.size = spsn->flash.sector_size * params->nr_sectors;
+ spsn->flash.erase_cmd = CMD_S25FLXX_SE;
return &spsn->flash;
}