sf: add struct spi_flash.sector_size parameter
This patch adds a new member to struct spi_flash (u16 sector_size) and updates the spi flash drivers to start populating it. This parameter can be used by spi flash commands that need to round up units of operation to the flash's sector_size. Having this number in one place also allows duplicated code to be further collapsed into one common location (such as erase parameter and the detected message). Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
committed by
Mike Frysinger
parent
cdb6a00fb8
commit
4e6a515899
@@ -33,6 +33,8 @@ struct spi_flash {
|
||||
|
||||
u32 size;
|
||||
|
||||
u32 sector_size;
|
||||
|
||||
int (*read)(struct spi_flash *flash, u32 offset,
|
||||
size_t len, void *buf);
|
||||
int (*write)(struct spi_flash *flash, u32 offset,
|
||||
|
||||
Reference in New Issue
Block a user