Re: [RFC PATCHv2 1/4] drivers/otp: add initial support for OTP memory

Jamie Iles
2011-03-25T22:27:21Z

On Fri, Mar 25, 2011 at 05:32:54PM -0400, Mike Frysinger wrote:
> On Fri, Mar 25, 2011 at 06:08, Jamie Iles wrote:
> > I guess in this framework we could make the OTP look like a single
> > region of the 0x80 data pages concatenated or provide separate regions
> > for each group of 0x80 pages but the control and ECC pages aren't
> > directly accessible by the user.
>
> well, in the current driver, i let people dump the ECC. for
> debugging, i think that's valuable.

Hmm, that does sound potentially useful. In v3 I've created a single
partition that excludes the control bits and the ecc. How about I
change that for the next spin so there are two partitions where the
first contains the raw data and the second is all of the ECC lumped
together. It may also be useful to have a name attribute for each
region to make this clear.

It's either that or add another ioctl() for getting the ECC but that
doesn't feel very nice.

> > The other question that brings up is whether any compatibility with the
> > old driver is required.
>
> it's already going to be changing names ;). but what other
> compatibility are you thinking of ? the requirements are you have to
> be able to:
> - read it
> - write in full/aligned 64bit chunks
> - do an OTPLOCK ioctl (the drivers uses this to manage the first few
> pages which flags all other pages as "locked")

Well the current version will do all of that so I think if we add the
ECC dumping ability then everything is there.

Jamie