summaryrefslogtreecommitdiffstats
path: root/include/spi_flash.h
diff options
context:
space:
mode:
authorRichard Retanubun <RichardRetanubun@ruggedcom.com>2011-02-16 16:37:22 -0500
committerMike Frysinger <vapier@gentoo.org>2011-04-12 02:15:37 -0400
commit4e6a515899290635bfd7fe3aef8c4d4d9e88fced (patch)
treee4e38baaa882e2dab02c7a1ab83a0912029d605b /include/spi_flash.h
parentcdb6a00fb8f96b9259ed7d77a1eacbfa3777ddac (diff)
downloadblackbird-obmc-uboot-4e6a515899290635bfd7fe3aef8c4d4d9e88fced.tar.gz
blackbird-obmc-uboot-4e6a515899290635bfd7fe3aef8c4d4d9e88fced.zip
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>
Diffstat (limited to 'include/spi_flash.h')
-rw-r--r--include/spi_flash.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/spi_flash.h b/include/spi_flash.h
index 89cc3a7cc3..a384071fbe 100644
--- a/include/spi_flash.h
+++ b/include/spi_flash.h
@@ -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,
OpenPOWER on IntegriCloud