diff options
Diffstat (limited to 'src/drivers/spi/gigadevice.c')
-rw-r--r-- | src/drivers/spi/gigadevice.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/drivers/spi/gigadevice.c b/src/drivers/spi/gigadevice.c index 9d163f8a22..9686ee9871 100644 --- a/src/drivers/spi/gigadevice.c +++ b/src/drivers/spi/gigadevice.c @@ -192,11 +192,6 @@ out: return ret; } -static int gigadevice_erase(struct spi_flash *flash, u32 offset, size_t len) -{ - return spi_flash_cmd_erase(flash, CMD_GD25_SE, offset, len); -} - static struct gigadevice_spi_flash stm; struct spi_flash *spi_flash_probe_gigadevice(struct spi_slave *spi, u8 *idcode) @@ -226,7 +221,7 @@ struct spi_flash *spi_flash_probe_gigadevice(struct spi_slave *spi, u8 *idcode) page_size = 1 << params->l2_page_size; stm.flash.write = gigadevice_write; - stm.flash.erase = gigadevice_erase; + stm.flash.erase = spi_flash_cmd_erase; #if CONFIG_SPI_FLASH_NO_FAST_READ stm.flash.read = spi_flash_cmd_read_slow; #else @@ -237,6 +232,7 @@ struct spi_flash *spi_flash_probe_gigadevice(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_GD25_SE; return &stm.flash; } |