public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* MTD/ DoC Millenium Plus - Failure in flash detection
@ 2005-07-06 15:45 Ruediger Haertel
  2005-07-07 13:05 ` Ruediger Haertel
  0 siblings, 1 reply; 9+ messages in thread
From: Ruediger Haertel @ 2005-07-06 15:45 UTC (permalink / raw)
  To: linux-mtd

Hello all,

I am trying to get the DOC Millenium Plus chip (16 MB, ChipID = 0x41) on 
my board (Coldfire 5272, uClinux) running. The chip as such is detected. 
If the DoC is accessed correctly then the flash chip has id 0xA5. This 
id is not in the table of NAND IDs in the file nand_ids.c.

The cvs MTD drivers has 0xA5 assigned to a SAMSUNG 2 GiB chip. But as 
far as I know the Doc MilPlus 16MB uses a Toshiba flash.

Any suggestions what's wrong here.

How would I verify that access to the DoC is correct?
At which address would I read? and what to expect?

If this would work, how do I proceed? I read something about 
nftl_format?


The documents/books I found so far (Building embedded linux; Linux MTD, 
JFFS Howto ..) mostly concentrate on using some kind of pluggable DOC 
chips that can be inserted in a computer that has Windows or Linux 
running. Then everything can be done with some tools. But how really to 
do it on an embedded linux with a soldered DoC ?



-- 

Ruediger Haertel

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

* Re: MTD/ DoC Millenium Plus - Failure in flash detection
  2005-07-06 15:45 MTD/ DoC Millenium Plus - Failure in flash detection Ruediger Haertel
@ 2005-07-07 13:05 ` Ruediger Haertel
  2005-07-07 13:21   ` Thomas Gleixner
  0 siblings, 1 reply; 9+ messages in thread
From: Ruediger Haertel @ 2005-07-07 13:05 UTC (permalink / raw)
  To: linux-mtd

Am Mittwoch, 6. Juli 2005 17:45 schrieb Ruediger Haertel:
> Hello all,
>
> I am trying to get the DOC Millenium Plus chip 16 MB, ChipID = 0x41)
> on my board (Coldfire 5272, uClinux) running. The chip as such is
> detected. If the DoC is accessed correctly then the flash chip has id
> 0xA5. This id is not in the table of NAND IDs in the file nand_ids.c.
>
> The cvs MTD drivers has 0xA5 assigned to a SAMSUNG 2 GiB chip. But as
> far as I know the Doc MilPlus 16MB uses a Toshiba flash.
>
> Any suggestions what's wrong here.

I updated the mtd drivers as stated on the infradead website. Because 
the API changed I had to make small fixes to my cfi mapping module. Now 
the chip is correctly detected. Both drivers, ie. the old DiskOnChip 
and the new NAND DiskOnChip, work.
For the NAND DiskOnChip driver I had to apply the patch mentioned here:
http://lists.infradead.org/pipermail/linux-mtd/2004-October/010640.html

Using configured DiskOnChip probe address 0x40000000
DiskOnChip found at 0x40000000
NAND device: Manufacturer ID: 0x98, Chip ID: 0x73 (Toshiba NAND 16MiB 
3,3V 8-bi)
nand_read_ecc: Failed ECC read, page 0x00000020 on chip 0
ECC error scanning DOC at 0x4000
nand_read_ecc: Failed ECC read, page 0x00000040 on chip 0
ECC error scanning DOC at 0x8000
nand_read_ecc: Failed ECC read, page 0x00000060 on chip 0
ECC error scanning DOC at 0xc000
doc200x_correct_data corrected 2 errors
nand_read_ecc: Failed ECC read, page 0x00000080 on chip 0
ECC error scanning DOC at 0x10000
DiskOnChip BNAND Media Header not found.
mtd: Giving out device 5 to DiskOnChip Millennium Plus

What irritates me is the output: 
DiskOnChip BNAND Media Header not found.

Why is that ?
How can I make a first test of the DoC, ie. reading writing reading?
I tried nanddump and nandtest. But no success:

/>nanddump /dev/mtd5 /var/xxx 0 128
MTD_open
MTD_ioctl
Unknown flash (not normalM NAND)
TD_close
pid 29: failed 256

/> nandtest /dev/mtd5
MTD_open
open flash: Permission denied
pid 31: failed 256


Any help apreciated :)

-- 

Ruediger Haertel

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

* Re: MTD/ DoC Millenium Plus - Failure in flash detection
  2005-07-07 13:05 ` Ruediger Haertel
@ 2005-07-07 13:21   ` Thomas Gleixner
  2005-07-07 13:32     ` Ruediger Haertel
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Gleixner @ 2005-07-07 13:21 UTC (permalink / raw)
  To: Ruediger Haertel; +Cc: linux-mtd

On Thu, 2005-07-07 at 15:05 +0200, Ruediger Haertel wrote:
> For the NAND DiskOnChip driver I had to apply the patch mentioned here:
> http://lists.infradead.org/pipermail/linux-mtd/2004-October/010640.html
> 

> What irritates me is the output: 
> DiskOnChip BNAND Media Header not found.
> 
> Why is that ?

Obviously the header is not at the expected place.


> />nanddump /dev/mtd5 /var/xxx 0 128
> MTD_open
> MTD_ioctl
> Unknown flash (not normalM NAND)

Is this nanddump from latest MTD-CVS ?

tglx

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

* Re: MTD/ DoC Millenium Plus - Failure in flash detection
  2005-07-07 13:21   ` Thomas Gleixner
@ 2005-07-07 13:32     ` Ruediger Haertel
  2005-07-07 14:00       ` Thomas Gleixner
  2005-07-07 15:04       ` Ruediger Haertel
  0 siblings, 2 replies; 9+ messages in thread
From: Ruediger Haertel @ 2005-07-07 13:32 UTC (permalink / raw)
  To: linux-mtd; +Cc: tglx

Am Donnerstag, 7. Juli 2005 15:21 schrieb Thomas Gleixner:
> On Thu, 2005-07-07 at 15:05 +0200, Ruediger Haertel wrote:
> > For the NAND DiskOnChip driver I had to apply the patch mentioned
> > here:
> > http://lists.infradead.org/pipermail/linux-mtd/2004-October/010640.
> >html
> >
> >
> > What irritates me is the output:
> > DiskOnChip BNAND Media Header not found.
> >
> > Why is that ?
>
> Obviously the header is not at the expected place.
>
> > />nanddump /dev/mtd5 /var/xxx 0 128
> > MTD_open
> > MTD_ioctl
> > Unknown flash (not normalM NAND)
>
> Is this nanddump from latest MTD-CVS ?

No. I use the one of the uClinux-dist-20041215. I'll give the one from 
mtd-cvs a try. Should I use realy the latest snapshot or the one I am 
using from date 2005.03.03.



So from your point the other messages from my output are ok ?

nand_read_ecc: Failed ECC read, page 0x00000020 on chip 0
ECC error scanning DOC at 0x4000
nand_read_ecc: Failed ECC read, page 0x00000040 on chip 0
ECC error scanning DOC at 0x8000
nand_read_ecc: Failed ECC read, page 0x00000060 on chip 0
ECC error scanning DOC at 0xc000
doc200x_correct_data corrected 2 errors
nand_read_ecc: Failed ECC read, page 0x00000080 on chip 0
ECC error scanning DOC at 0x10000


-- 

Ruediger Haertel

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

* Re: MTD/ DoC Millenium Plus - Failure in flash detection
  2005-07-07 13:32     ` Ruediger Haertel
@ 2005-07-07 14:00       ` Thomas Gleixner
  2005-07-07 15:04       ` Ruediger Haertel
  1 sibling, 0 replies; 9+ messages in thread
From: Thomas Gleixner @ 2005-07-07 14:00 UTC (permalink / raw)
  To: Ruediger Haertel; +Cc: linux-mtd

On Thu, 2005-07-07 at 15:32 +0200, Ruediger Haertel wrote:
> So from your point the other messages from my output are ok ?
> 
> nand_read_ecc: Failed ECC read, page 0x00000020 on chip 0
> ECC error scanning DOC at 0x4000
> nand_read_ecc: Failed ECC read, page 0x00000040 on chip 0
> ECC error scanning DOC at 0x8000
> nand_read_ecc: Failed ECC read, page 0x00000060 on chip 0
> ECC error scanning DOC at 0xc000
> doc200x_correct_data corrected 2 errors
> nand_read_ecc: Failed ECC read, page 0x00000080 on chip 0
> ECC error scanning DOC at 0x10000

Thats a known error, which is not a problem

For whatever reasons the first page is written without ECC, so the ECC
check fails, but data is returned correctly

tglx

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

* Re: MTD/ DoC Millenium Plus - Failure in flash detection
  2005-07-07 13:32     ` Ruediger Haertel
  2005-07-07 14:00       ` Thomas Gleixner
@ 2005-07-07 15:04       ` Ruediger Haertel
  2005-07-08  8:48         ` Ruediger Haertel
  1 sibling, 1 reply; 9+ messages in thread
From: Ruediger Haertel @ 2005-07-07 15:04 UTC (permalink / raw)
  To: tglx; +Cc: linux-mtd

Am Donnerstag, 7. Juli 2005 15:32 schrieb Ruediger Haertel:
> Am Donnerstag, 7. Juli 2005 15:21 schrieb Thomas Gleixner:
> > On Thu, 2005-07-07 at 15:05 +0200, Ruediger Haertel wrote:
> > > For the NAND DiskOnChip driver I had to apply the patch mentioned
> > > here:
> > > http://lists.infradead.org/pipermail/linux-mtd/2004-October/01064
> > >0. html
> > >
> > >
> > > What irritates me is the output:
> > > DiskOnChip BNAND Media Header not found.
> > >
> > > Why is that ?
> >
> > Obviously the header is not at the expected place.
> >
> > > />nanddump /dev/mtd5 /var/xxx 0 128
> > > MTD_open
> > > MTD_ioctl
> > > Unknown flash (not normalM NAND)
> >
> > Is this nanddump from latest MTD-CVS ?
>
> No. I use the one of the uClinux-dist-20041215. I'll give the one
> from mtd-cvs a try. Should I use realy the latest snapshot or the one
> I am using from date 2005.03.03.
>

Now I used the nanddump from mtd-cvs 2005-03-03. The same result. It 
reads oobsize and oobblock as 0.

I printed the values of the mtd structure during probing and they are:
oob size: 16, oob block: 512

Seems ok. So I guess my device file is not correct. I am 
using /dev/mtd5,c,90,9. 

Just for completeness here is the probing output of the driver:

Using configured DiskOnChip probe address 0x40000000
DiskOnChip found at 0x40000000
NAND device: Manufacturer ID: 0x98, Chip ID: 0x73 (Toshiba NAND 16MiB 
3,3V 8-bit)
oob size: 16, oob block: 512
nand_read_ecc: Failed ECC read, page 0x00000020 on chip 0
ECC error scanning DOC at 0x4000
nand_read_ecc: Failed ECC read, page 0x00000040 on chip 0
ECC error scanning DOC at 0x8000
nand_read_ecc: Failed ECC read, page 0x00000060 on chip 0
ECC error scanning DOC at 0xc000
nand_read_ecc: Failed ECC read, page 0x00000080 on chip 0
ECC error scanning DOC at 0x10000
DiskOnChip BNAND Media Header not found.
mtd: Giving out device 5 to DiskOnChip Millennium Plus

-- 

Ruediger Haertel

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

* Re: MTD/ DoC Millenium Plus - Failure in flash detection
  2005-07-07 15:04       ` Ruediger Haertel
@ 2005-07-08  8:48         ` Ruediger Haertel
  2005-07-08  9:21           ` Ruediger Haertel
  2005-07-11  8:04           ` Ruediger Haertel
  0 siblings, 2 replies; 9+ messages in thread
From: Ruediger Haertel @ 2005-07-08  8:48 UTC (permalink / raw)
  To: tglx; +Cc: linux-mtd


> > >
> > > Is this nanddump from latest MTD-CVS ?
> >
> > No. I use the one of the uClinux-dist-20041215. I'll give the one
> > from mtd-cvs a try. Should I use realy the latest snapshot or the
> > one I am using from date 2005.03.03.
>
> Now I used the nanddump from mtd-cvs 2005-03-03. The same result. It
> reads oobsize and oobblock as 0.
>
> I printed the values of the mtd structure during probing and they
> are: oob size: 16, oob block: 512
>
> Seems ok. So I guess my device file is not correct. I am
> using /dev/mtd5,c,90,9.
>

Stupid me. Of course it was the wrong device file. MTD Devices have an 
even minor number (mtd->index*2). The odd minor (mtd->index* 2+1) 
number is used for readonly device files. Now I use the device 
file /dev/mtd5,c,90,10.

Now I get output from nanddump. But I cannot see the file contents that 
I wrote to the DoC.

testfile: "0123456789ABCDEF"

/> nandwrite -p /dev/mtd5 /mnt/testfile
MTD_open
MTD_ioctl
MTD_ioctl
Writing data to block 0
MTD_ioctl
Bad block at 0, 1 block(s) from 0 willM be skipped
Writing dataT to block 4000
D_ioctl
MTD_write
MTD_close

Seems to have worked. However nanddump (I dumped the complete 16 MB) 
does not show the file contents on the DoC.
Do I have to format the DoC or do any other preparation? I thought that 
was only necessary with the "old" driver.

This is also my next step. Preparing for a filesystem. I think I have to 
format it with the ntfl_format tool and then mkfs.jff2. Right?


-- 

Ruediger Haertel

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

* Re: MTD/ DoC Millenium Plus - Failure in flash detection
  2005-07-08  8:48         ` Ruediger Haertel
@ 2005-07-08  9:21           ` Ruediger Haertel
  2005-07-11  8:04           ` Ruediger Haertel
  1 sibling, 0 replies; 9+ messages in thread
From: Ruediger Haertel @ 2005-07-08  9:21 UTC (permalink / raw)
  To: tglx; +Cc: linux-mtd

Am Freitag, 8. Juli 2005 10:48 schrieb Ruediger Haertel:
> > > > Is this nanddump from latest MTD-CVS ?
> > >
> > > No. I use the one of the uClinux-dist-20041215. I'll give the one
> > > from mtd-cvs a try. Should I use realy the latest snapshot or the
> > > one I am using from date 2005.03.03.
> >
> > Now I used the nanddump from mtd-cvs 2005-03-03. The same result.
> > It reads oobsize and oobblock as 0.
> >
> > I printed the values of the mtd structure during probing and they
> > are: oob size: 16, oob block: 512
> >
> > Seems ok. So I guess my device file is not correct. I am
> > using /dev/mtd5,c,90,9.
>
> Stupid me. Of course it was the wrong device file. MTD Devices have
> an even minor number (mtd->index*2). The odd minor (mtd->index* 2+1)
> number is used for readonly device files. Now I use the device file
> /dev/mtd5,c,90,10.
>
> Now I get output from nanddump. But I cannot see the file contents
> that I wrote to the DoC.
>
> testfile: "0123456789ABCDEF"
>
> /> nandwrite -p /dev/mtd5 /mnt/testfile
> MTD_open
> MTD_ioctl
> MTD_ioctl
> Writing data to block 0
> MTD_ioctl
> Bad block at 0, 1 block(s) from 0 willM be skipped
> Writing dataT to block 4000
> D_ioctl
> MTD_write
> MTD_close
>
> Seems to have worked. However nanddump (I dumped the complete 16 MB)
> does not show the file contents on the DoC.

After I erased the /dev/mtd5 (eraseall /dev/mtd5 == my DoC) and did a 
nandwrite I could see the contents. But it seems that it also destroyed 
something other because I couldn't reboot. The bootloader showed only 
silly characters.
After downloading the kernel again the boot screen showed the following 
lines:

Using configured DiskOnChip probe address 0x40000000
DiskOnChip found at 0x40000000
No NAND device found!!!
No valid DiskOnChip devices found

Hmm. This is not nice. What can I do to revoke it again?

-- 

Ruediger Haertel

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

* Re: MTD/ DoC Millenium Plus - Failure in flash detection
  2005-07-08  8:48         ` Ruediger Haertel
  2005-07-08  9:21           ` Ruediger Haertel
@ 2005-07-11  8:04           ` Ruediger Haertel
  1 sibling, 0 replies; 9+ messages in thread
From: Ruediger Haertel @ 2005-07-11  8:04 UTC (permalink / raw)
  To: tglx; +Cc: linux-mtd

Am Freitag, 8. Juli 2005 10:48 schrieb Ruediger Haertel:
>
> Now I get output from nanddump. But I cannot see the file contents
> that I wrote to the DoC.
>
> testfile: "0123456789ABCDEF"
>
> /> nandwrite -p /dev/mtd5 /mnt/testfile
> MTD_open
> MTD_ioctl
> MTD_ioctl
> Writing data to block 0
> MTD_ioctl
> Bad block at 0, 1 block(s) from 0 willM be skipped
> Writing dataT to block 4000
> D_ioctl
> MTD_write
> MTD_close
>
> Seems to have worked. However nanddump (I dumped the complete 16 MB)
> does not show the file contents on the DoC.
> Do I have to format the DoC or do any other preparation? I thought
> that was only necessary with the "old" driver.
>
> This is also my next step. Preparing for a filesystem. I think I have
> to format it with the ntfl_format tool and then mkfs.jff2. Right?

Using "nftl_format /dev/mtd5" erases the DoC like "eraseall /dev/mtd5" 
completely so that no flash chips are detected :(.

Any suggestions how to restore the original state of the DoC.

-- 

Ruediger Haertel

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

end of thread, other threads:[~2005-07-11  8:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-06 15:45 MTD/ DoC Millenium Plus - Failure in flash detection Ruediger Haertel
2005-07-07 13:05 ` Ruediger Haertel
2005-07-07 13:21   ` Thomas Gleixner
2005-07-07 13:32     ` Ruediger Haertel
2005-07-07 14:00       ` Thomas Gleixner
2005-07-07 15:04       ` Ruediger Haertel
2005-07-08  8:48         ` Ruediger Haertel
2005-07-08  9:21           ` Ruediger Haertel
2005-07-11  8:04           ` Ruediger Haertel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox