diff options
Diffstat (limited to 'include/linux/mtd/nand.h')
-rw-r--r-- | include/linux/mtd/nand.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 3e0044b94f..c23c1fd4cc 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h @@ -85,6 +85,8 @@ extern void nand_wait_ready(struct mtd_info *mtd); #define NAND_CMD_RNDIN 0x85 #define NAND_CMD_READID 0x90 #define NAND_CMD_ERASE2 0xd0 +#define NAND_CMD_SETFEATURE 0xee +#define NAND_CMD_GETFEATURE 0xef #define NAND_CMD_RESET 0xff /* Extended commands for large page devices */ @@ -92,6 +94,11 @@ extern void nand_wait_ready(struct mtd_info *mtd); #define NAND_CMD_RNDOUTSTART 0xE0 #define NAND_CMD_CACHEDPROG 0x15 +/* Extended commands for ONFI devices */ +#define NAND_CMD_READ_PARAM 0xec +#define NAND_CMD_GET_FEATURES 0xee +#define NAND_CMD_SET_FEATURES 0xef + /* Extended commands for AG-AND device */ /* * Note: the command for NAND_CMD_DEPLETE1 is really 0x00 but @@ -128,6 +135,7 @@ typedef enum { NAND_ECC_SOFT, NAND_ECC_HW, NAND_ECC_HW_SYNDROME, + NAND_ECC_CHIP, } nand_ecc_modes_t; /* @@ -369,6 +377,10 @@ struct nand_chip { void __iomem *IO_ADDR_R; void __iomem *IO_ADDR_W; + uint8_t maf_id, dev_id; /* manufacturer/device identifier */ + uint8_t has_chip_ecc; /* !0 if chip has internal ECC engine */ + uint8_t ecc_status; /* status of read w/ECC */ + uint8_t (*read_byte)(struct mtd_info *mtd); u16 (*read_word)(struct mtd_info *mtd); void (*write_buf)(struct mtd_info *mtd, const uint8_t *buf, int len); |