Implementing OTP

Tom Tatakis ttatakis at appliedlogix.com
Thu May 5 10:35:32 PDT 2016


Hello,

I have implemented OTP functionality in the NAND driver for the
Macronix MX30LF1G18AC device.  I would like to send it on up in a
patch but I'd like to confirm that what I did makes sense.  I modified
 nand_base.c file to include the requisite functions for reading and
writing the OTP.  I also modified the nand_scan_tail function to
assign the names of the functions in the mtd structure.  The potential
issue is that the ONFI command used to read and write the OTP uses a
feature address of 0x90 which is defined as part of the 'Vendor
Specific' area if I understand the ONFI spec (it's entirely possible
that I do not).  Specifically, section 5.30 in Version 4.0 of the ONFI
spec.

If my modification of nand_base.c to include this makes sense, then I
can put together a patch.

I did try and figure out a way to get this potentially device
dependent code into its own file, but I do not see how to do that
other than creating a whole other driver for it complete with a
configuration setting.  If that's what I need to do then I will try
and put it together.  If there is a better way and you can point me
int the right direction, that would be helpful as well.

Thanks for you time
Tom



More information about the linux-mtd mailing list