All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* mtd: nand: lock unlock function
@ 2014-11-05 20:31 Zhi Li
  2014-11-05 20:57 ` Brian Norris
  0 siblings, 1 reply; 6+ messages in thread
From: Zhi Li @ 2014-11-05 20:31 UTC (permalink / raw
  To: linux-mtd, Huang Shijie, boris.brezillon

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?


best regards
Frank Li

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mtd: nand: lock unlock function
  2014-11-05 20:31 mtd: nand: lock unlock function Zhi Li
@ 2014-11-05 20:57 ` Brian Norris
  2014-11-05 22:00   ` Zhi Li
  0 siblings, 1 reply; 6+ messages in thread
From: Brian Norris @ 2014-11-05 20:57 UTC (permalink / raw
  To: Zhi Li; +Cc: Huang Shijie, White Ding, linux-mtd, boris.brezillon

+

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mtd: nand: lock unlock function
  2014-11-05 20:57 ` Brian Norris
@ 2014-11-05 22:00   ` Zhi Li
  2014-11-06  0:50     ` Huang Shijie
  2014-11-06  2:32     ` bpqw
  0 siblings, 2 replies; 6+ messages in thread
From: Zhi Li @ 2014-11-05 22:00 UTC (permalink / raw
  To: Brian Norris; +Cc: Huang Shijie, White Ding, linux-mtd, boris.brezillon

On Wed, Nov 5, 2014 at 2:57 PM, Brian Norris
<computersforpeace@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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mtd: nand: lock unlock function
  2014-11-05 22:00   ` Zhi Li
@ 2014-11-06  0:50     ` Huang Shijie
  2014-11-06  2:32     ` bpqw
  1 sibling, 0 replies; 6+ messages in thread
From: Huang Shijie @ 2014-11-06  0:50 UTC (permalink / raw
  To: Zhi Li; +Cc: linux-mtd, White Ding, Brian Norris, Huang Shijie,
	boris.brezillon

On Wed, Nov 05, 2014 at 04:00:29PM -0600, Zhi Li wrote:
> On Wed, Nov 5, 2014 at 2:57 PM, Brian Norris
> <computersforpeace@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.
> 
could you please describe what is the problem?

thanks
Huang Shijie

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: mtd: nand: lock unlock function
  2014-11-05 22:00   ` Zhi Li
  2014-11-06  0:50     ` Huang Shijie
@ 2014-11-06  2:32     ` bpqw
  2014-11-06  3:31       ` Zhi Li
  1 sibling, 1 reply; 6+ messages in thread
From: bpqw @ 2014-11-06  2:32 UTC (permalink / raw
  To: Zhi Li
  Cc: Huang Shijie, bpqw, Brian Norris, linux-mtd@lists.infradead.org,
	boris.brezillon@free-electrons.com

> 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

Hi Zhi,
There is a LOCK# pin for Micron NAND flash device, lock feature is disabled 
if you leave this LOCK# pin low or unconnected. Only when you pull high this 
LOCK# pin, all NAND flash blocks are locked after power on, users need to send
Unlock command to unlock blocks.
Can you help descript what problem you met?

Thanks

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mtd: nand: lock unlock function
  2014-11-06  2:32     ` bpqw
@ 2014-11-06  3:31       ` Zhi Li
  0 siblings, 0 replies; 6+ messages in thread
From: Zhi Li @ 2014-11-06  3:31 UTC (permalink / raw
  To: bpqw
  Cc: Huang Shijie, Brian Norris, linux-mtd@lists.infradead.org,
	boris.brezillon@free-electrons.com

On Wed, Nov 5, 2014 at 8:32 PM, bpqw <bpqw@micron.com> wrote:
>> 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
>
> Hi Zhi,
> There is a LOCK# pin for Micron NAND flash device, lock feature is disabled
> if you leave this LOCK# pin low or unconnected. Only when you pull high this
> LOCK# pin, all NAND flash blocks are locked after power on, users need to send
> Unlock command to unlock blocks.
> Can you help descript what problem you met?

Yes, that's exact problem. Our board design connect LOCK# to VCC wrongly.

>
> Thanks

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-11-06  3:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-05 20:31 mtd: nand: lock unlock function Zhi Li
2014-11-05 20:57 ` Brian Norris
2014-11-05 22:00   ` Zhi Li
2014-11-06  0:50     ` Huang Shijie
2014-11-06  2:32     ` bpqw
2014-11-06  3:31       ` Zhi Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.