Commit aa4f59d9 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

update micron driver

parent fb001670
...@@ -14,11 +14,15 @@ ...@@ -14,11 +14,15 @@
#define MICRON_NUM_OTP_FIRSTPAGE 2 #define MICRON_NUM_OTP_FIRSTPAGE 2
#define MICRON_NUM_OTP_PAGES 30 #define MICRON_NUM_OTP_PAGES 30
static int mt29f_get_user_prot_info(struct mtd_info *mtd, struct otp_info *buf, // Elphel, Rocko
size_t len) //static int mt29f_get_user_prot_info(struct mtd_info *mtd, struct otp_info *buf, size_t len)
static int mt29f_get_user_prot_info(struct mtd_info *mtd, size_t len, size_t *retlen, struct otp_info *buf)
{ {
int i; int i;
// Elphel, Rocko
*retlen = 0;
if (len < MICRON_NUM_OTP_PAGES * sizeof(*buf)) if (len < MICRON_NUM_OTP_PAGES * sizeof(*buf))
return -ENOSPC; return -ENOSPC;
...@@ -44,7 +48,7 @@ static int mt29f_read_user_prot_reg(struct mtd_info *mtd, loff_t from, ...@@ -44,7 +48,7 @@ static int mt29f_read_user_prot_reg(struct mtd_info *mtd, loff_t from,
struct nand_chip *chip = mtd->priv; struct nand_chip *chip = mtd->priv;
struct mtd_oob_ops ops; struct mtd_oob_ops ops;
int ret; int ret;
u8 get_feature,i; u8 get_feature;
/* Valid pages in otp are 02h-1Fh. */ /* Valid pages in otp are 02h-1Fh. */
if (from > MICRON_NUM_OTP_PAGES << chip->page_shift) if (from > MICRON_NUM_OTP_PAGES << chip->page_shift)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment