diff options
author | Anatolij Gustschin | 2012-08-09 08:18:12 +0200 |
---|---|---|
committer | Stefan Roese | 2012-08-13 14:34:35 +0200 |
commit | 66863b0538d3667a0a4bb64b0eb9197aea27f855 (patch) | |
tree | 636fe1a955a7ff4884a164ab069b86668676a208 /include/mtd/cfi_flash.h | |
parent | b4f106be2d8a4eb34ce41c5306d5a4fcc37e60e3 (diff) |
cfi_flash: add support for Spansion flash PPB sector protection
Erasing flash sectors protected with persistent protection bit (PPB)
mechanism on Spansion flash chips doesn't work. Add sector protection
status checking and sector lock and unlock commands to fix this.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'include/mtd/cfi_flash.h')
-rw-r--r-- | include/mtd/cfi_flash.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/mtd/cfi_flash.h b/include/mtd/cfi_flash.h index 3245b443af4..966b5e00cac 100644 --- a/include/mtd/cfi_flash.h +++ b/include/mtd/cfi_flash.h @@ -60,6 +60,13 @@ #define AMD_CMD_UNLOCK_ACK 0x55 #define AMD_CMD_WRITE_TO_BUFFER 0x25 #define AMD_CMD_WRITE_BUFFER_CONFIRM 0x29 +#define AMD_CMD_SET_PPB_ENTRY 0xC0 +#define AMD_CMD_SET_PPB_EXIT_BC1 0x90 +#define AMD_CMD_SET_PPB_EXIT_BC2 0x00 +#define AMD_CMD_PPB_UNLOCK_BC1 0x80 +#define AMD_CMD_PPB_UNLOCK_BC2 0x30 +#define AMD_CMD_PPB_LOCK_BC1 0xA0 +#define AMD_CMD_PPB_LOCK_BC2 0x00 #define AMD_STATUS_TOGGLE 0x40 #define AMD_STATUS_ERROR 0x20 |