summaryrefslogtreecommitdiff
path: root/src/drivers/spi/adesto.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/spi/adesto.c')
-rw-r--r--src/drivers/spi/adesto.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/drivers/spi/adesto.c b/src/drivers/spi/adesto.c
index 0fba3e6677..fdde90f697 100644
--- a/src/drivers/spi/adesto.c
+++ b/src/drivers/spi/adesto.c
@@ -145,11 +145,6 @@ out:
return ret;
}
-static int adesto_erase(struct spi_flash *flash, u32 offset, size_t len)
-{
- return spi_flash_cmd_erase(flash, CMD_AT25DF_SE, offset, len);
-}
-
struct spi_flash *spi_flash_probe_adesto(struct spi_slave *spi, u8 *idcode)
{
const struct adesto_spi_flash_params *params;
@@ -183,7 +178,7 @@ struct spi_flash *spi_flash_probe_adesto(struct spi_slave *spi, u8 *idcode)
page_size = 1 << params->l2_page_size;
stm->flash.write = adesto_write;
- stm->flash.erase = adesto_erase;
+ stm->flash.erase = spi_flash_cmd_erase;
#if CONFIG_SPI_FLASH_NO_FAST_READ
stm->flash.read = spi_flash_cmd_read_slow;
#else
@@ -194,6 +189,7 @@ struct spi_flash *spi_flash_probe_adesto(struct spi_slave *spi, u8 *idcode)
stm->flash.size = page_size * params->pages_per_sector
* params->sectors_per_block
* params->nr_blocks;
+ stm->flash.erase_cmd = CMD_AT25DF_SE;
return &stm->flash;
}