summaryrefslogtreecommitdiff
path: root/include/spi_flash.h
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-04-25 06:58:29 +0000
committerWolfgang Denk <wd@denx.de>2011-07-26 16:29:27 +0200
commitd4aa500913adf074ad85b1b74bf79e9abb104a70 (patch)
treef2b0c25d1b1a483a8bed6b1fbe012e211c0397b7 /include/spi_flash.h
parent2744a4e688851fc3b5e2937bf047100c85daeb43 (diff)
downloadu-boot-d4aa500913adf074ad85b1b74bf79e9abb104a70.tar.gz
u-boot-d4aa500913adf074ad85b1b74bf79e9abb104a70.tar.bz2
u-boot-d4aa500913adf074ad85b1b74bf79e9abb104a70.zip
sf: unify write funcs
Once we add a new page_size field for write lengths, we can unify the write methods for most of the spi flash drivers. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'include/spi_flash.h')
-rw-r--r--include/spi_flash.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/spi_flash.h b/include/spi_flash.h
index a384071fbe..2671ab5539 100644
--- a/include/spi_flash.h
+++ b/include/spi_flash.h
@@ -31,8 +31,11 @@ struct spi_flash {
const char *name;
+ /* Total flash size */
u32 size;
-
+ /* Write (page) size */
+ u32 page_size;
+ /* Erase (sector) size */
u32 sector_size;
int (*read)(struct spi_flash *flash, u32 offset,