public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "Håkan Kvist" <hagar@df.lth.se>
To: linux-mtd@lists.infradead.org
Subject: Re: Problems with getting a nand-flash chip to work
Date: Mon, 20 Feb 2006 16:38:57 +0100	[thread overview]
Message-ID: <20060220153856.GA8027@festis.df.lth.se> (raw)
In-Reply-To: <20060217152524.GA21805@festis.df.lth.se>

On Fri, Feb 17, 2006 at 04:25:25PM +0100, Håkan Kvist wrote:
> On Fri, Feb 17, 2006 at 10:44:03AM +0100, Håkan Kvist wrote:

[..]

> I belive that I forget to mention that the chip that we are currently 
> using is the 512 Mbit chip from STMicroelectronics.
> 
> I also have tested the to write directly to the nand with the 
> mtd_debug utility.
> 
> I've filled the first 4 blocks (65535 bytes) with data, and I can read
> it back successfully and verify that it is identical to what I wrote.
> 
> What is the next thing I should look into?

Now I have erased the flash with "flash_eraseall -j /dev/mtdx",
then the nanddump utility was used to dump the contens of the flash to
a file.

According to the documentation on the linux-mtd homepage the first
oob-area of every page should look like this 
(03 20 is ERASEBLOCK_CLEANMARKER):

          xx xx xx xx xx xx xx xx  85 19 03 20 08 00 00 00

and what I got is (05 20 is ERASEBLOCK_HEADER)
         
          xx xx xx xx xx xx xx xx  85 19 05 20 18 00 00 00

Is that correct?

The state of the flash after a flash_erasell -j, should be a
filesystem that can be mounted directly, without doing any erasing,
right?

As the result from doing mtd_eraseall isn't cleanmarker blocks it is
perhpahs not so strange that mount complains about that 
cleanmarker nodes aren't to be found.

And as posted before, I get the following when running
  mount -t JFFS2 /dev/mtdX /mnt

========== Output from mount (just the last rows)
mtd->read(0x400 bytes from 0x3fec000) returned ECC error
nand_read_oob: from = 0x03fec000, len = 64
nand_isbad_bbt(): bbt info for offs 0x03ff0000: (block 4092) 0x00
nand_read_oob: from = 0x03ff0000, len = 48
jffs2_check_nand_cleanmarker_ebh(): Cleanmarker node not 
detected in block at 03ff0000
nand_read_ecc: from = 0x03ff0000, len = 1024
nand_read_ecc: Failed ECC read, page 0x0001ff80
mtd->read(0x400 bytes from 0x3ff0000) returned ECC error
nand_read_oob: from = 0x03ff0000, len = 64
JFFS2: Erase block at 0x03ff0000 is not formatted. It will be erased
nand_isbad_bbt(): bbt info for offs 0x03ff4000: (block 4093) 0x00
nand_read_oob: from = 0x03ff4000, len = 48
jffs2_check_nand_cleanmarker_ebh(): Cleanmarker node not detected 
in block at 03ff4000
nand_read_ecc: from = 0x03ff4000, len = 1024
nand_read_ecc: Failed ECC read, page 0x0001ffa0
nand_read_ecc: Failed ECC read, page 0x0001ffa1
mtd->read(0x400 bytes from 0x3ff4000) returned ECC error
nand_read_oob: from = 0x03ff4000, len = 64
JFFS2: Erase block at 0x03ff4000 is not formatted. It will be erased
nand_isbad_bbt(): bbt info for offs 0x03ff8000: (block 4094) 0x00
nand_read_oob: from = 0x03ff8000, len = 48
nand_read_ecc: from = 0x03ff8000, len = 1024
nand_read_ecc: Failed ECC read, page 0x0001ffc0
mtd->read(0x400 bytes from 0x3ff8000) returned ECC error
nand_read_oob: from = 0x03ff8000, len = 64
nand_isbad_bbt(): bbt info for offs 0x03ffc000: (block 4095) 0x00
nand_read_oob: from = 0x03ffc000, len = 48
nand_read_ecc: from = 0x03ffc000, len = 1024
nand_read_ecc: Failed ECC read, page 0x0001ffe0
nand_read_ecc: Failed ECC read, page 0x0001ffe1
mtd->read(0x400 bytes from 0x3ffc000) returned ECC error
nand_read_oob: from = 0x03ffc000, len = 64
Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
empty_blocks 0, bad_blocks 1, c->nr_blocks 4096
mount: Mounting /dev/mtdblock1 on /mnt/flash failed: Input/output error


========== Output from hexdump|tail -20
00000000  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
*
00000200  ff ff ff ff ff ff ff ff  85 19 05 20 18 00 00 00
00000210  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
*
00000410  ff ff ff ff ff ff ff ff  64 93 3c ed 00 00 00 00
00000420  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
*
00000620  ff ff ff ff ff ff ff ff  00 00 00 00 00 00 00 00
00000630  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
*
00004400  ff ff ff ff ff ff ff ff  85 19 05 20 18 00 00 00
00004410  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
*
00004610  ff ff ff ff ff ff ff ff  64 93 3c ed 00 00 00 00
00004620  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
*
00004820  ff ff ff ff ff ff ff ff  00 00 00 00 00 00 00 00
00004830  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff



best regards
Håkan

  reply	other threads:[~2006-02-20 15:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-17  9:44 Problems with getting a nand-flash chip to work Håkan Kvist
2006-02-17 15:25 ` Håkan Kvist
2006-02-20 15:38   ` Håkan Kvist [this message]
2006-02-20 15:59     ` 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=20060220153856.GA8027@festis.df.lth.se \
    --to=hagar@df.lth.se \
    --cc=linux-mtd@lists.infradead.org \
    /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