mtd: nand: lock unlock function

Zhi Li lznuaa at gmail.com
Wed Nov 5 14:00:29 PST 2014


On Wed, Nov 5, 2014 at 2:57 PM, Brian Norris
<computersforpeace at gmail.com> wrote:
> +
>
> 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)

Yes, we recently met a problem with micron flash. Need send unlock command.
The datasheet I get from micron
MT29F8G08ABACA, MT29F8G16ABACA, MT29F8G08ABBCA,
MT29F8G16ABBCA, MT29F16G08ADACA, MT29F16G16ADACA,
MT29F16G08ADBCA , MT29F16G16ADBCA

support it.
But not sure if it is public document.

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



More information about the linux-mtd mailing list