--- zzzz-none-000/linux-2.4.17/include/linux/mtd/mtd.h 2001-06-12 17:30:27.000000000 +0000 +++ sangam-fb-322/linux-2.4.17/include/linux/mtd/mtd.h 2004-11-24 13:21:45.000000000 +0000 @@ -1,5 +1,5 @@ -/* $Id: mtd.h,v 1.33 2001/06/09 00:08:59 dwmw2 Exp $ */ +/* $Id: mtd.h,v 1.1.1.1 2003/06/23 22:18:43 jharrell Exp $ */ #ifndef __MTD_MTD_H__ #define __MTD_MTD_H__ @@ -137,7 +137,7 @@ u_int32_t flags; u_int32_t size; // Total size of the MTD - /* "Major" erase size for the device. Nave users may take this + /* "Major" erase size for the device. Nave users may take this * to be the only erase size available, or may use the more detailed * information below if they desire */ @@ -180,6 +180,18 @@ int (*read_oob) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf); int (*write_oob) (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf); + /* + * Methods to access the protection register area, present in some + * flash devices. The user data is one time programmable but the + * factory data is read only. + */ + int (*read_user_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf); + + int (*read_fact_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf); + + /* This function is not yet implemented */ + int (*write_user_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf); + /* iovec-based read/write methods. We need these especially for NAND flash, with its limited number of write cycles per erase. NB: The 'count' parameter is the number of _vectors_, each of