Lines Matching refs:mtd
329 static int macronix_30lfxg18ac_get_otp_info(struct mtd_info *mtd, size_t len,
371 static int __macronix_30lfxg18ac_rw_otp(struct mtd_info *mtd,
382 nand = mtd_to_nand(mtd);
421 dev_err(&mtd->dev, "failed to perform OTP IO: %i\n", ret);
425 dev_err(&mtd->dev, "failed to leave OTP mode after %s\n",
433 static int macronix_30lfxg18ac_write_otp(struct mtd_info *mtd, loff_t to,
437 return __macronix_30lfxg18ac_rw_otp(mtd, to, len, rlen, (u_char *)buf,
441 static int macronix_30lfxg18ac_read_otp(struct mtd_info *mtd, loff_t from,
445 return __macronix_30lfxg18ac_rw_otp(mtd, from, len, rlen, buf, false);
448 static int macronix_30lfxg18ac_lock_otp(struct mtd_info *mtd, loff_t from,
462 struct mtd_info *mtd;
477 mtd = nand_to_mtd(chip);
478 mtd->_get_user_prot_info = macronix_30lfxg18ac_get_otp_info;
479 mtd->_read_user_prot_reg = macronix_30lfxg18ac_read_otp;
480 mtd->_write_user_prot_reg = macronix_30lfxg18ac_write_otp;
481 mtd->_lock_user_prot_reg = macronix_30lfxg18ac_lock_otp;