public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: David George <david@harktech.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] NAND Send RESET before initial READID
Date: Fri, 17 Oct 2008 13:01:48 -0400	[thread overview]
Message-ID: <48F8C4FC.7030807@harktech.com> (raw)

We had a problem where NAND device ID would be corrupted after a 
power-cycle.  According to the Micron datasheet it requires a RESET 
after power-up before any commands may be issued.  Without this patch 
the manufacturer ID would be correct, but the device ID, cellinfo and 
extra ID would be incorrect.

Signed-off-by: David George <david@harktech.com>
---
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 0913bb8..3b9552d 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -2360,6 +2360,12 @@ static struct nand_flash_dev 
*nand_get_flash_type(struct mtd_info *mtd,
        /* Select the device */
        chip->select_chip(mtd, 0);

+       /*
+        * Micron needs a RESET after power up before issuing
+        * any other commands
+        */
+       chip->cmdfunc(mtd, NAND_CMD_RESET, -1, -1);
+
        /* Send the command for reading device ID */
        chip->cmdfunc(mtd, NAND_CMD_READID, 0x00, -1);

-- 
David George
Hark Technologies
http://harktech.com

             reply	other threads:[~2008-10-17 17:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-17 17:01 David George [this message]
2008-10-23 18:43 ` [U-Boot] [PATCH] NAND Send RESET before initial READID Scott Wood

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=48F8C4FC.7030807@harktech.com \
    --to=david@harktech.com \
    --cc=u-boot@lists.denx.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