summaryrefslogtreecommitdiff
path: root/include/spi_flash.h
diff options
context:
space:
mode:
authorJagannadha Sutradharudu Teki <jaganna@xilinx.com>2013-06-19 15:37:09 +0530
committerJagannadha Sutradharudu Teki <jaganna@xilinx.com>2013-06-23 22:02:50 +0530
commite612ddf5939ba257f2933c7539ee39a3f760e8ce (patch)
treeaa9a7fa125a05f0ded8ca452ff452b27531b2aef /include/spi_flash.h
parentcf6b11dcda2f13d1c05c2f20e2a1735a833a41fe (diff)
sf: Read flash bank addr register at probe time
Read the flash bank addr register to get the state of bank in a perticular flash. and also bank write happens only when there is a change in bank selection from user. bank read only valid for flashes which has > 16Mbytes those are opearted in 3-byte addr mode, each bank occupies 16Mytes. Suppose if the flash has 64Mbytes size consists of 4 banks like bank0, bank1, bank2 and bank3. Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.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 38587c2de4c..91b43ee9df3 100644
--- a/include/spi_flash.h
+++ b/include/spi_flash.h
@@ -42,6 +42,8 @@ struct spi_flash {
u8 bank_read_cmd;
/* Bank write cmd */
u8 bank_write_cmd;
+ /* Current flash bank */
+ u8 bank_curr;
void *memory_map; /* Address of read-only SPI flash access */
int (*read)(struct spi_flash *flash, u32 offset,