mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Sascha Hauer <sha@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] mtd: nand: fix nand_lock/unlock() function
Date: Thu, 15 Nov 2018 09:32:28 +0100	[thread overview]
Message-ID: <6b21d190-ee47-5ffc-bfe8-59604ac217a3@pengutronix.de> (raw)
In-Reply-To: <20181115080214.4iyo6jojt6oclxhb@pengutronix.de>


[-- Attachment #1.1.1: Type: text/plain, Size: 1756 bytes --]

On 11/15/18 9:02 AM, Sascha Hauer wrote:
> On Wed, Nov 14, 2018 at 12:04:27PM +0100, Marc Kleine-Budde wrote:
>> From: White Ding <bpqw@micron.com>
>>
>> Do nand reset before write protect check.
>>
>> If we want to check the WP# low or high through STATUS READ and check bit 7,
>> we must reset the device, other operation (eg.erase/program a locked block) can
>> also clear the bit 7 of status register.
>>
>> As we know the status register can be refreshed, if we do some operation to trigger it,
>> for example if we do erase/program operation to one block that is locked, then READ STATUS,
>> the bit 7 of READ STATUS will be 0 indicate the device in write protect, then if we do
>> erase/program operation to another block that is unlocked, the bit 7 of READ STATUS will
>> be 1 indicate the device is not write protect.
>> Suppose we checked the bit 7 of READ STATUS is 0 then judge the WP# is low (write protect),
>> but in this case the WP# maybe high if we do erase/program operation to a locked block,
>> so we must reset the device if we want to check the WP# low or high through STATUS READ and
>> check bit 7.
> 
> Have you observed a failure this patch fixes or what is your motivation
> to send this patch?

A $CUSTOMER send me in private a fix needed for the micron NAND chip
found his Phytec board or a board they derived from it. I noticed that
the fix is in mainline Linux, too and I decided to cherry pick it into
barebox.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2018-11-15  8:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-14 11:04 Marc Kleine-Budde
2018-11-15  8:02 ` Sascha Hauer
2018-11-15  8:32   ` Marc Kleine-Budde [this message]
2018-11-16  7:33 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6b21d190-ee47-5ffc-bfe8-59604ac217a3@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=sha@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox