From e612ddf5939ba257f2933c7539ee39a3f760e8ce Mon Sep 17 00:00:00 2001 From: Jagannadha Sutradharudu Teki Date: Wed, 19 Jun 2013 15:37:09 +0530 Subject: 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 Reviewed-by: Simon Glass --- include/spi_flash.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/spi_flash.h b/include/spi_flash.h index 38587c2..91b43ee 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, -- cgit v1.1