public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Savin Zlobec <savin@epico.si>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH] AT91RM9200 NAND support
Date: Tue, 20 Jun 2006 13:12:39 +0200	[thread overview]
Message-ID: <1150801960.6780.132.camel@localhost.localdomain> (raw)
In-Reply-To: <4497D2CE.7070000@epico.si>

Savin,

On Tue, 2006-06-20 at 12:49 +0200, Savin Zlobec wrote:

Patch is correct, applied. Thanks

> And managed to erase the nand flash  and mount JFFS2 on it, but writting 
> still
> didn't work -  got  errors like :
> 
> Data CRC d507eb40 != calculated CRC 2e617dde for node at 00e4f700
> 
> The I put a call to nand_wait_ready at the top of nand_command function and
> as far as I could test everything worked (exept that the flash is still 
> recognized as Toshiba (0x98) not Samsung (0xec)).

Well, we read the manufacturer ID. When we get 98H, how should we know
that this is a Samsung part ? And I doubt that this is a quad bit flip.

> It looks (to me) that there are still some parts of the code that should 
> wait for nand to get ready before sending commands.

The only point where this really matters is, when we read data from
those chips. They have a horrible feature, which automatically loads the
next page into the internal buffer. There are only two places where we
actually read from the device. On has the check at the correct place
already, the other fixed you up.

Can you please remove the nand_wait_ready() call in nand_command() and
test the following patch ? It disables the ready busy pin and uses the
chip_delay. Please check, whether the 20us are correct. You can safely
set it to 50 without breaking stuff.

	tglx


Index: mtd/drivers/mtd/nand/at91_nand.c
===================================================================
--- mtd.orig/drivers/mtd/nand/at91_nand.c
+++ mtd/drivers/mtd/nand/at91_nand.c
@@ -141,7 +141,6 @@ static int __init at91_nand_probe(struct
 	nand_chip->IO_ADDR_R = host->io_base;
 	nand_chip->IO_ADDR_W = host->io_base;
 	nand_chip->cmd_ctrl = at91_nand_cmd;
-	nand_chip->dev_ready = at91_nand_device_ready;
 	nand_chip->ecc.mode = NAND_ECC_SOFT;	/* enable ECC */
 	nand_chip->chip_delay = 20;		/* 20us command delay time */
 

  reply	other threads:[~2006-06-20 11:11 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-20  6:54 [PATCH] AT91RM9200 NAND support Andrew Victor
2006-06-20  7:08 ` Thomas Gleixner
2006-06-20  7:17   ` Andrew Victor
2006-06-20  7:43     ` Savin Zlobec
2006-06-20  8:00       ` Thomas Gleixner
2006-06-20  8:08         ` Thomas Gleixner
2006-06-20  9:07         ` Savin Zlobec
2006-06-20  9:18           ` Thomas Gleixner
2006-06-20 10:49             ` Savin Zlobec
2006-06-20 11:12               ` Thomas Gleixner [this message]
2006-06-20 11:42                 ` Savin Zlobec
2006-06-20 11:55                   ` Thomas Gleixner
2006-06-20 12:28                     ` Savin Zlobec
2006-06-20 12:44                       ` Thomas Gleixner
2006-06-20 12:52                         ` Thomas Gleixner
2006-06-20 13:17                           ` Savin Zlobec
2006-06-20 13:01                         ` Savin Zlobec
2006-06-20 13:21                           ` Thomas Gleixner
2006-06-20 13:48                             ` Savin Zlobec
2006-06-20 13:57                               ` Thomas Gleixner
2006-06-20 14:24                                 ` Savin Zlobec
2006-06-20 14:24                                   ` Thomas Gleixner
2006-06-20 14:29                                   ` Thomas Gleixner
2006-06-20 15:53                                     ` Savin Zlobec
2006-06-20 15:53                                       ` Thomas Gleixner
2006-06-20 16:03                                         ` Savin Zlobec
2006-06-20  9:07   ` David Woodhouse
2006-06-20  9:14     ` Thomas Gleixner

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=1150801960.6780.132.camel@localhost.localdomain \
    --to=tglx@linutronix.de \
    --cc=linux-mtd@lists.infradead.org \
    --cc=savin@epico.si \
    /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