NAND subpage write support interface

Gupta, Pekon pekon at ti.com
Thu Feb 28 01:41:31 EST 2013


Hi All,

Need a suggestion, based on my understanding of following flow in NAND driver:

MTD Writes: (Currently implemented)
nand_write [Interface]
    +-- nand_do_write_ops  [Internal]
              +-- chip->write_page   [Replacable]
                        +-- chip->ecc.write_page_raw  [Replaceable]
                        +-- chip->ecc.write_page [Replaceable]


MTD Read: (Currently implemented)
nand_read [Interface]
    +-- nand_do_read_ops  [Internal]
                +-- chip->ecc.read_page_raw  [Replaceable]
                +-- chip->ecc.read_subpage [Replaceable]
                +-- chip->ecc.write_page [Replaceable]


As per above, the 'MTD_Write' data-path is not same as 'MTD_Read'.
There is extra interface of  'chip->write_page', which was probably kept 
for different programming modes on MLC/SLC nands.


My queries: 
 (1) Going forward, Can the MLC and SLC programming sequence be merged 
In generic 'nand_do_write_ops' ? 
And 'chip->write_page' interface can be deprecated?
Currently I do not see any driver  except 'lpc32xx_mlc.c' using this interface. 

--------------------------------------------------

MTD Writes: (with deprecated chip->write_page interface)
nand_write [Interface]
    +-- nand_do_write_ops  [Internal]
               +-- chip->ecc.write_page_raw  [Replaceable]
               +-- chip->ecc.write_page [Replaceable]

--------------------------------------------------


 (2) To add support for NAND subpage writes, I need to pass 'column' offset 
also till chip->ecc.nand_subpage_write. So I need to either update existing 
'chip->write_page' interface,  
OR add a new interface 'chip->write_subpage' in parallel.

--------------------------------------------------

MTD Writes: (including chip->write_subpage in addition to chip->write_page)
nand_write [Interface]
    +-- nand_do_write_ops  [Internal]
              +-- chip->write_page   [Replacable]
                         +-- chip->ecc.write_page_raw  [Replaceable]
                         +-- chip->ecc.write_page [Replaceable]
              +-- chip->write_subpage_page   [Replacable]
                         +-- chip->ecc.write_subpage [Replaceable]

--------------------------------------------------

Please suggest which is approach is more scalable, and clean going forward.
(Apologies if the mail formatting was messed up)


with regards, pekon



More information about the linux-mtd mailing list