aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mtd/nand.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mtd/nand.h')
-rw-r--r--include/linux/mtd/nand.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index ccab9dfc5217..48bc2c54302c 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -38,6 +38,12 @@ extern void nand_release (struct mtd_info *mtd);
38/* Internal helper for board drivers which need to override command function */ 38/* Internal helper for board drivers which need to override command function */
39extern void nand_wait_ready(struct mtd_info *mtd); 39extern void nand_wait_ready(struct mtd_info *mtd);
40 40
41/* locks all blockes present in the device */
42extern int nand_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
43
44/* unlocks specified locked blockes */
45extern int nand_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
46
41/* The maximum number of NAND chips in an array */ 47/* The maximum number of NAND chips in an array */
42#define NAND_MAX_CHIPS 8 48#define NAND_MAX_CHIPS 8
43 49
@@ -82,6 +88,10 @@ extern void nand_wait_ready(struct mtd_info *mtd);
82#define NAND_CMD_ERASE2 0xd0 88#define NAND_CMD_ERASE2 0xd0
83#define NAND_CMD_RESET 0xff 89#define NAND_CMD_RESET 0xff
84 90
91#define NAND_CMD_LOCK 0x2a
92#define NAND_CMD_UNLOCK1 0x23
93#define NAND_CMD_UNLOCK2 0x24
94
85/* Extended commands for large page devices */ 95/* Extended commands for large page devices */
86#define NAND_CMD_READSTART 0x30 96#define NAND_CMD_READSTART 0x30
87#define NAND_CMD_RNDOUTSTART 0xE0 97#define NAND_CMD_RNDOUTSTART 0xE0