summaryrefslogtreecommitdiff
path: root/drivers/mtd/spi/spi_flash_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/spi/spi_flash_internal.h')
-rw-r--r--drivers/mtd/spi/spi_flash_internal.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mtd/spi/spi_flash_internal.h b/drivers/mtd/spi/spi_flash_internal.h
index 440c044..114b634 100644
--- a/drivers/mtd/spi/spi_flash_internal.h
+++ b/drivers/mtd/spi/spi_flash_internal.h
@@ -20,6 +20,7 @@
#define CMD_READ_ARRAY_LEGACY 0xe8
#define CMD_READ_STATUS 0x05
+#define CMD_WRITE_ENABLE 0x06
/* Common status */
#define STATUS_WIP 0x01
@@ -58,6 +59,10 @@ int spi_flash_cmd_poll_bit(struct spi_flash *flash, unsigned long timeout,
*/
int spi_flash_cmd_wait_ready(struct spi_flash *flash, unsigned long timeout);
+/* Erase sectors. */
+int spi_flash_cmd_erase(struct spi_flash *flash, u8 erase_cmd,
+ u32 erase_size, u32 offset, size_t len);
+
/* Manufacturer-specific probe functions */
struct spi_flash *spi_flash_probe_spansion(struct spi_slave *spi, u8 *idcode);
struct spi_flash *spi_flash_probe_atmel(struct spi_slave *spi, u8 *idcode);