Re: mtd: nand: lock unlock function

Brian Norris
2014-11-05T20:57:32Z

+

On Wed, Nov 05, 2014 at 02:31:34PM -0600, Zhi Li wrote:
> Does any know the reason why there are nand_lock and nand_unlock
> function in nand_base.c, but
>
> mtd->_lock = NULL;
> mtd->_unlock = NULL;
>
> Not set to nand_lock and nand_unlock?

Possible answers:

* Lack of testing

* The LOCK/UNLOCK opcodes are not supported by all vendors

* Even the vendors that support them don't do so consistently (not sure
about this one; I know Micron supports this in some cases)

* The opcodes aren't even documented (again, I'm not even sure about
this one; but many Micron datasheets I see don't mention LOCK/UNLOCK.
I recall that other similar lock/protection implementations are
secret to some extent, and are intentionally omitted from the
datasheets)

I'd be happy to be proven wrong on any of these points.

Brian