public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Does UBI support MLC nand flash?
@ 2008-01-02  1:42 Nancy
  2008-01-02  4:45 ` Kyungmin Park
  2008-01-02 13:46 ` Adrian Hunter
  0 siblings, 2 replies; 16+ messages in thread
From: Nancy @ 2008-01-02  1:42 UTC (permalink / raw)
  To: linux-mtd

Sir / Madam,

             Does UBI support MLC nand flash?

             According to the MLC nand spec, It is only allowed write
once per erased
block, moreover, it isn't allowed ramdom write during a block, means
the page number must be increase during the write PED operation.


--
Best Regards,
Nancy

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

* RE: Does UBI support MLC nand flash?
  2008-01-02  1:42 Does UBI support MLC nand flash? Nancy
@ 2008-01-02  4:45 ` Kyungmin Park
  2008-01-02  6:13   ` Nancy
  2008-01-02 13:46 ` Adrian Hunter
  1 sibling, 1 reply; 16+ messages in thread
From: Kyungmin Park @ 2008-01-02  4:45 UTC (permalink / raw)
  To: 'Nancy', linux-mtd

Hi,

I think it can support MLC NAND in the code.
The big differences between the SLC and MLC are NOP (or subpage) and POR handling.

Generally SLC has NOP 4 (old chips have 8) whereas MLC has NOP 1.
In NAND code, it handles with NAND_NO_SUBPAGE_WRITE and NAND_CI_CELLTYPE_MSK.
Umm, who uses the NAND_NO_SUBPAGE_WRITE in code?
Anyway it maybe checks it with the CELLTYPE from 3rd ID data.

And sequential write is also only permitted at large page SLC NAND. It means it's working well on MLC NAND in current UBI code. If
not, it also doesn't work at SLC NAND.

Thank you,
Kyungmin Park

-----Original Message-----
From: linux-mtd-bounces@lists.infradead.org [mailto:linux-mtd-bounces@lists.infradead.org] On Behalf Of Nancy
Sent: Wednesday, January 02, 2008 10:42 AM
To: linux-mtd@lists.infradead.org
Subject: Does UBI support MLC nand flash?

Sir / Madam,

             Does UBI support MLC nand flash?

             According to the MLC nand spec, It is only allowed write
once per erased
block, moreover, it isn't allowed ramdom write during a block, means
the page number must be increase during the write PED operation.


--
Best Regards,
Nancy

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: Does UBI support MLC nand flash?
  2008-01-02  4:45 ` Kyungmin Park
@ 2008-01-02  6:13   ` Nancy
  2008-01-02  6:19     ` Nancy
                       ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Nancy @ 2008-01-02  6:13 UTC (permalink / raw)
  To: kmpark; +Cc: linux-mtd

Sir,
     I don't know what is NOP, POP stand for? can you explain that?

     I notice mtd-utils "nandwrite.c" does write each page's oob area
twice, write oob(filesystem area) once, and then call "pwrite" to
write pagedata including oob (ecc part). I don't think that will work
right on MLC nand.


--
Best Regards,
Nancy

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

* Re: Does UBI support MLC nand flash?
  2008-01-02  6:13   ` Nancy
@ 2008-01-02  6:19     ` Nancy
  2008-01-02  7:13       ` David Brown
  2008-01-02 12:39       ` Josh Boyer
  2008-01-02  7:11     ` David Brown
                       ` (2 subsequent siblings)
  3 siblings, 2 replies; 16+ messages in thread
From: Nancy @ 2008-01-02  6:19 UTC (permalink / raw)
  To: kmpark; +Cc: linux-mtd

oh, forgot to metion UBI.
UBI has two headers for each LED/PED, they are not write at same time.
Is that against MLC nand's no ramdom write and  write only once
permission?

--
Best Regards,
Nancy

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

* Re: Does UBI support MLC nand flash?
  2008-01-02  6:13   ` Nancy
  2008-01-02  6:19     ` Nancy
@ 2008-01-02  7:11     ` David Brown
  2008-01-02  7:23     ` Kyungmin Park
  2008-01-02  7:27     ` David Brown
  3 siblings, 0 replies; 16+ messages in thread
From: David Brown @ 2008-01-02  7:11 UTC (permalink / raw)
  To: Nancy; +Cc: linux-mtd, kmpark

On Wed, Jan 02, 2008 at 02:13:07PM +0800, Nancy wrote:

>I notice mtd-utils "nandwrite.c" does write each page's oob area
>twice, write oob(filesystem area) once, and then call "pwrite" to
>write pagedata including oob (ecc part). I don't think that will work
>right on MLC nand.

The underlying driver will have to support cached writes for this to work.
It's listed as a TODO in nand_base.c, at least in the stable kernel.

Dave

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

* Re: Does UBI support MLC nand flash?
  2008-01-02  6:19     ` Nancy
@ 2008-01-02  7:13       ` David Brown
  2008-01-02 12:39       ` Josh Boyer
  1 sibling, 0 replies; 16+ messages in thread
From: David Brown @ 2008-01-02  7:13 UTC (permalink / raw)
  To: Nancy; +Cc: linux-mtd, kmpark

On Wed, Jan 02, 2008 at 02:19:16PM +0800, Nancy wrote:
>oh, forgot to metion UBI.
>UBI has two headers for each LED/PED, they are not write at same time.
>Is that against MLC nand's no ramdom write and  write only once
>permission?

Yes.  Perhaps one could be written at the beginning of the block and one
always written at the end of the block.  It wastes more pages that way,
though.

If the second write is only to indicate that the block is invalid, it
_might_ be permissible to write it out of order, since the out of order
write might only corrupt data.  Depending on underlying device
implementation, it might also just not work, though.

Dave

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

* RE: Does UBI support MLC nand flash?
  2008-01-02  6:13   ` Nancy
  2008-01-02  6:19     ` Nancy
  2008-01-02  7:11     ` David Brown
@ 2008-01-02  7:23     ` Kyungmin Park
       [not found]       ` <bae050c10801020133h3b121b2ft47911a0d84921868@mail.gmail.com>
  2008-01-02  7:27     ` David Brown
  3 siblings, 1 reply; 16+ messages in thread
From: Kyungmin Park @ 2008-01-02  7:23 UTC (permalink / raw)
  To: 'Nancy'; +Cc: linux-mtd

Hi,

Refer to previous mail [1,2] related with terminology.

We have to check the flash type & flags such as MTD_OOB_WRITEABLE in mtd-utils too. Or use the mtd_ops to write main and oob
simultaneously if the detected chip is MLC.

Thank you,
Kyungmin Park

1. http://lists.infradead.org/pipermail/linux-mtd/2007-December/020041.html
2. http://git.infradead.org/?p=users/kmpark/onenand-mtd-2.6.git;a=commitdiff;h=4dbecbd80d346f9f6cd5284fb423f5c62bdbc750


-----Original Message-----
From: linux-mtd-bounces@lists.infradead.org [mailto:linux-mtd-bounces@lists.infradead.org] On Behalf Of Nancy
Sent: Wednesday, January 02, 2008 3:13 PM
To: kmpark@infradead.org
Cc: linux-mtd@lists.infradead.org
Subject: Re: Does UBI support MLC nand flash?

Sir,
     I don't know what is NOP, POP stand for? can you explain that?

     I notice mtd-utils "nandwrite.c" does write each page's oob area
twice, write oob(filesystem area) once, and then call "pwrite" to
write pagedata including oob (ecc part). I don't think that will work
right on MLC nand.


--
Best Regards,
Nancy

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: Does UBI support MLC nand flash?
  2008-01-02  6:13   ` Nancy
                       ` (2 preceding siblings ...)
  2008-01-02  7:23     ` Kyungmin Park
@ 2008-01-02  7:27     ` David Brown
  3 siblings, 0 replies; 16+ messages in thread
From: David Brown @ 2008-01-02  7:27 UTC (permalink / raw)
  To: linux-mtd

On Wed, Jan 02, 2008 at 02:13:07PM +0800, Nancy wrote:

>I notice mtd-utils "nandwrite.c" does write each page's oob area
>twice, write oob(filesystem area) once, and then call "pwrite" to
>write pagedata including oob (ecc part). I don't think that will work
>right on MLC nand.

The underlying driver will have to support cached writes for this to work.
It's listed as a TODO in nand_base.c, at least in the stable kernel.

Dave

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

* Re: Does UBI support MLC nand flash?
       [not found]       ` <bae050c10801020133h3b121b2ft47911a0d84921868@mail.gmail.com>
@ 2008-01-02  9:36         ` Nancy
  2008-01-02  9:37           ` Nancy
  0 siblings, 1 reply; 16+ messages in thread
From: Nancy @ 2008-01-02  9:36 UTC (permalink / raw)
  To: kmpark; +Cc: linux-mtd

Thank you, Mr. Kyungmin Park
But we do not use JFFS2, if UBI supports MLC nand well, we decide to
use UBIFS instead of current YAFFS2.

We use "nandwrite" for nandflash content's burning. That's more faster
and easiser than do the same job under filesystem support(mount, cp
....)

MTD code change a lot in 2.6 kernel. In old verion of MTD, we added a
MEMWRITEPAGE ioctl to call nand_write_ecc(nand_base.c) whose parameter
"eccbuf" can be offered for fs use. But in the latest version of MTD
code, I can't find a function call meet our needs.

If UBI do not support MLC, we will still use our old one. Faking VFAT
fs info( erase count and virtual block number) must write to oob area,
and ...that's MLC nand, nandwrite.c have to be change.

Oh, MLC nand's badblock tag is  in the last page of earseblock's oob.
some related code have to be changed too.

I write this only for the interface designer reconsider it.

Thanks for all the people who reply me :-)

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

* Re: Does UBI support MLC nand flash?
  2008-01-02  9:36         ` Nancy
@ 2008-01-02  9:37           ` Nancy
  0 siblings, 0 replies; 16+ messages in thread
From: Nancy @ 2008-01-02  9:37 UTC (permalink / raw)
  To: linux-mtd

Thank you, Mr. Kyungmin Park
But we do not use JFFS2, if UBI supports MLC nand well, we decide to
use UBIFS instead of current YAFFS2.

We use "nandwrite" for nandflash content's burning. That's more faster
and easiser than do the same job under filesystem support(mount, cp
....)

MTD code change a lot in 2.6 kernel. In old verion of MTD, we added a
MEMWRITEPAGE ioctl to call nand_write_ecc(nand_base.c) whose parameter
"eccbuf" can be offered for fs use. But in the latest version of MTD
code, I can't find a function call meet our needs.

If UBI do not support MLC, we will still use our old one. Faking VFAT
fs info( erase count and virtual block number) must write to oob area,
and ...that's MLC nand, nandwrite.c have to be change.

Oh, MLC nand's badblock tag is  in the last page of earseblock's oob.
some related code have to be changed too.

I write this only for the interface designer reconsider it.

Thanks for all the people who reply me :-)

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

* Re: Does UBI support MLC nand flash?
  2008-01-02  6:19     ` Nancy
  2008-01-02  7:13       ` David Brown
@ 2008-01-02 12:39       ` Josh Boyer
  2008-01-02 16:52         ` David Brown
  1 sibling, 1 reply; 16+ messages in thread
From: Josh Boyer @ 2008-01-02 12:39 UTC (permalink / raw)
  To: Nancy; +Cc: linux-mtd, kmpark

On Wed, 2 Jan 2008 14:19:16 +0800
Nancy <nancydreaming@gmail.com> wrote:

> oh, forgot to metion UBI.
> UBI has two headers for each LED/PED, they are not write at same time.
> Is that against MLC nand's no ramdom write and  write only once
> permission?

Not to my knowledge.  The second header is written to the second page
in the block if subpage writes aren't supported by the underlying
chip.  That should still work fine for MLC.

josh

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

* Re: Does UBI support MLC nand flash?
  2008-01-02  1:42 Does UBI support MLC nand flash? Nancy
  2008-01-02  4:45 ` Kyungmin Park
@ 2008-01-02 13:46 ` Adrian Hunter
  1 sibling, 0 replies; 16+ messages in thread
From: Adrian Hunter @ 2008-01-02 13:46 UTC (permalink / raw)
  To: ext Nancy; +Cc: linux-mtd

ext Nancy wrote:
> Sir / Madam,
> 
>              Does UBI support MLC nand flash?
> 
>              According to the MLC nand spec, It is only allowed write
> once per erased
> block, moreover, it isn't allowed ramdom write during a block, means
> the page number must be increase during the write PED operation.
> 
> 
> --
> Best Regards,
> Nancy
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/

As Artem is on holiday, I am replying to this.

UBI (and UBIFS) write sequentially to NAND pages within an eraseblock so there should be no problem with MLC NAND.

However the driver must not set up subpages because UBI will prefer to write subpages if they are available.

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

* Re: Does UBI support MLC nand flash?
  2008-01-02 12:39       ` Josh Boyer
@ 2008-01-02 16:52         ` David Brown
  2008-01-02 17:13           ` Josh Boyer
  0 siblings, 1 reply; 16+ messages in thread
From: David Brown @ 2008-01-02 16:52 UTC (permalink / raw)
  To: Josh Boyer; +Cc: Nancy, kmpark, linux-mtd

On Wed, Jan 02, 2008 at 06:39:45AM -0600, Josh Boyer wrote:
>On Wed, 2 Jan 2008 14:19:16 +0800
>Nancy <nancydreaming@gmail.com> wrote:
>
>> oh, forgot to metion UBI.
>> UBI has two headers for each LED/PED, they are not write at same time.
>> Is that against MLC nand's no ramdom write and  write only once
>> permission?
>
>Not to my knowledge.  The second header is written to the second page
>in the block if subpage writes aren't supported by the underlying
>chip.  That should still work fine for MLC.

Many MLC devices will not allow you to write to the second page after
having written to the third or subsequent pages.  Would this still work?

Dave

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

* Re: Does UBI support MLC nand flash?
  2008-01-02 16:52         ` David Brown
@ 2008-01-02 17:13           ` Josh Boyer
  2008-01-02 17:17             ` David Brown
  0 siblings, 1 reply; 16+ messages in thread
From: Josh Boyer @ 2008-01-02 17:13 UTC (permalink / raw)
  To: David Brown; +Cc: Nancy, kmpark, linux-mtd

On Wed, 2 Jan 2008 08:52:28 -0800
David Brown <davidb@davidb.org> wrote:

> On Wed, Jan 02, 2008 at 06:39:45AM -0600, Josh Boyer wrote:
> >On Wed, 2 Jan 2008 14:19:16 +0800
> >Nancy <nancydreaming@gmail.com> wrote:
> >
> >> oh, forgot to metion UBI.
> >> UBI has two headers for each LED/PED, they are not write at same time.
> >> Is that against MLC nand's no ramdom write and  write only once
> >> permission?
> >
> >Not to my knowledge.  The second header is written to the second page
> >in the block if subpage writes aren't supported by the underlying
> >chip.  That should still work fine for MLC.
> 
> Many MLC devices will not allow you to write to the second page after
> having written to the third or subsequent pages.  Would this still work?

Yes... UBI doesn't write actual data to the blocks until both headers
are in place.

josh

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

* Re: Does UBI support MLC nand flash?
  2008-01-02 17:13           ` Josh Boyer
@ 2008-01-02 17:17             ` David Brown
  2008-01-03  7:19               ` Nancy
  0 siblings, 1 reply; 16+ messages in thread
From: David Brown @ 2008-01-02 17:17 UTC (permalink / raw)
  To: Josh Boyer; +Cc: Nancy, kmpark, linux-mtd

On Wed, Jan 02, 2008 at 11:13:00AM -0600, Josh Boyer wrote:
>On Wed, 2 Jan 2008 08:52:28 -0800
>David Brown <davidb@davidb.org> wrote:
>
>> On Wed, Jan 02, 2008 at 06:39:45AM -0600, Josh Boyer wrote:
>> >On Wed, 2 Jan 2008 14:19:16 +0800
>> >Nancy <nancydreaming@gmail.com> wrote:
>> >
>> >> oh, forgot to metion UBI.
>> >> UBI has two headers for each LED/PED, they are not write at same time.
>> >> Is that against MLC nand's no ramdom write and  write only once
>> >> permission?
>> >
>> >Not to my knowledge.  The second header is written to the second page
>> >in the block if subpage writes aren't supported by the underlying
>> >chip.  That should still work fine for MLC.
>> 
>> Many MLC devices will not allow you to write to the second page after
>> having written to the third or subsequent pages.  Would this still work?
>
>Yes... UBI doesn't write actual data to the blocks until both headers
>are in place.

I guess I need to read up more.  I though the second header was written
after the data had been written.  In that case, it would probably be fine.

Dave

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

* Re: Does UBI support MLC nand flash?
  2008-01-02 17:17             ` David Brown
@ 2008-01-03  7:19               ` Nancy
  0 siblings, 0 replies; 16+ messages in thread
From: Nancy @ 2008-01-03  7:19 UTC (permalink / raw)
  To: David Brown, Adrian Hunter; +Cc: kmpark, linux-mtd

Thanks a lot everyone, your comment really help me a lot !!!
I never though the technical support of opensource can do this good.
I love here :P

Thanks again :-)

--
Best Regards,
Nancy

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

end of thread, other threads:[~2008-01-03  7:19 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-02  1:42 Does UBI support MLC nand flash? Nancy
2008-01-02  4:45 ` Kyungmin Park
2008-01-02  6:13   ` Nancy
2008-01-02  6:19     ` Nancy
2008-01-02  7:13       ` David Brown
2008-01-02 12:39       ` Josh Boyer
2008-01-02 16:52         ` David Brown
2008-01-02 17:13           ` Josh Boyer
2008-01-02 17:17             ` David Brown
2008-01-03  7:19               ` Nancy
2008-01-02  7:11     ` David Brown
2008-01-02  7:23     ` Kyungmin Park
     [not found]       ` <bae050c10801020133h3b121b2ft47911a0d84921868@mail.gmail.com>
2008-01-02  9:36         ` Nancy
2008-01-02  9:37           ` Nancy
2008-01-02  7:27     ` David Brown
2008-01-02 13:46 ` Adrian Hunter

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