diff options
author | Heiko Schocher <hs@denx.de> | 2014-07-18 06:07:21 +0200 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2014-07-23 12:26:45 +0200 |
commit | 562f8df18da62ae02c4ace1e530451fe82c3312d (patch) | |
tree | f3ac604fb5cc1a3865a91a99763f3d855c19bd4f /drivers/mtd/spi/sf_internal.h | |
parent | a0ae0091d783b1140f8d321d8c6d221aeb0d39d0 (diff) |
spi: add config option to enable the WP pin function on st micron flashes
enable the W#/Vpp signal to disable writing to the status
register on ST MICRON flashes like the N25Q128 thorugh
the new config option CONFIG_SYS_SPI_ST_ENABLE_WP_PIN
Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
Diffstat (limited to 'drivers/mtd/spi/sf_internal.h')
-rw-r--r-- | drivers/mtd/spi/sf_internal.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mtd/spi/sf_internal.h b/drivers/mtd/spi/sf_internal.h index 6bcd522040..19d49146eb 100644 --- a/drivers/mtd/spi/sf_internal.h +++ b/drivers/mtd/spi/sf_internal.h @@ -60,6 +60,10 @@ #define STATUS_QEB_MXIC (1 << 6) #define STATUS_PEC (1 << 7) +#ifdef CONFIG_SYS_SPI_ST_ENABLE_WP_PIN +#define STATUS_SRWD (1 << 7) /* SR write protect */ +#endif + /* Flash timeout values */ #define SPI_FLASH_PROG_TIMEOUT (2 * CONFIG_SYS_HZ) #define SPI_FLASH_PAGE_ERASE_TIMEOUT (5 * CONFIG_SYS_HZ) |