diff options
author | Brian Norris <computersforpeace@gmail.com> | 2015-11-10 12:15:27 -0800 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2015-11-19 13:34:44 -0800 |
commit | c67cbb839da9cc2757eabfa128556db6a2baf160 (patch) | |
tree | 1a8f6a07ef4ec5af82bb9af9d04c309ca34bb7bb /include/linux/mtd/spi-nor.h | |
parent | 1e6460abf739310fe695bafac30c2be39d18c8f9 (diff) |
mtd: spi-nor: provide default erase_sector implementation
Some spi-nor drivers perform sector erase by duplicating their
write_reg() command. Let's not require that the driver fill this out,
and provide a default instead.
Tested on m25p80.c and Medatek's MT8173 SPI NOR flash driver.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'include/linux/mtd/spi-nor.h')
-rw-r--r-- | include/linux/mtd/spi-nor.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h index 955f268d159a..7bed97471e53 100644 --- a/include/linux/mtd/spi-nor.h +++ b/include/linux/mtd/spi-nor.h @@ -143,7 +143,8 @@ struct mtd_info; * @read: [DRIVER-SPECIFIC] read data from the SPI NOR * @write: [DRIVER-SPECIFIC] write data to the SPI NOR * @erase: [DRIVER-SPECIFIC] erase a sector of the SPI NOR - * at the offset @offs + * at the offset @offs; if not provided by the driver, + * spi-nor will send the erase opcode via write_reg() * @flash_lock: [FLASH-SPECIFIC] lock a region of the SPI NOR * @flash_unlock: [FLASH-SPECIFIC] unlock a region of the SPI NOR * @flash_is_locked: [FLASH-SPECIFIC] check if a region of the SPI NOR is |