summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJagannadha Sutradharudu Teki <jaganna@xilinx.com>2013-10-02 19:36:58 +0530
committerJagannadha Sutradharudu Teki <jaganna@xilinx.com>2013-10-07 17:55:45 +0530
commitf4f51a8ff894d34eb332f0d11f6c73c7bf509848 (patch)
tree1aecd828a6cba2041187bd8355d808d1998a3edb /include
parent54024c15668ec5e8c261536e9bbc9d22dd01f3e6 (diff)
sf: probe: Add support for erase sector selection flag
SECT_4K, SECT_32K and SECT_64K opeartions are performed to to specific flash by adding a SECT* flag on respective spi_flash_params.flag param. Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Diffstat (limited to 'include')
-rw-r--r--include/spi_flash.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/spi_flash.h b/include/spi_flash.h
index de262ed12d..0d40e6c975 100644
--- a/include/spi_flash.h
+++ b/include/spi_flash.h
@@ -17,6 +17,10 @@
#include <linux/types.h>
#include <linux/compiler.h>
+/* SECT flags */
+#define SECT_4K (1 << 1)
+#define SECT_32K (1 << 2)
+
/* SST specific macros */
#ifdef CONFIG_SPI_FLASH_SST
# define SST_WP 0x01 /* Supports AAI word program */
@@ -33,8 +37,10 @@ struct spi_flash {
u32 size;
/* Write (page) size */
u32 page_size;
- /* Erase (sector) size */
+ /* Sector size */
u32 sector_size;
+ /* Erase size */
+ u32 erase_size;
#ifdef CONFIG_SPI_FLASH_BAR
/* Bank read cmd */
u8 bank_read_cmd;
@@ -45,6 +51,8 @@ struct spi_flash {
#endif
/* Poll cmd - for flash erase/program */
u8 poll_cmd;
+ /* Erase cmd 4K, 32K, 64K */
+ u8 erase_cmd;
void *memory_map; /* Address of read-only SPI flash access */
int (*read)(struct spi_flash *flash, u32 offset,