[PATCH 1/2] MTD: atmel_nand: Update Kconfig to support PMECC

Hong Xu hong.xu at atmel.com
Mon Dec 12 20:58:56 EST 2011


Hi Artem,

On 12/13/2011 09:14 AM, Hong Xu wrote:
> Hi David,

Sorry, this shall be Artem :-)

>
> On 12/13/2011 04:58 AM, Artem Bityutskiy wrote:
>  > On Thu, 2011-12-08 at 14:53 +0800, Hong Xu wrote:
>  > > +config MTD_NAND_ATMEL_PMECC_HW
>  > > + bool "Programmable Hardware ECC (BCH code)"
>  > > + depends on ARCH_AT91SAM9X5 || ARCH_AT91SAM9N12
>  > > + help
>  > > + Use Programmable Hardware ECC (PMECC) controller.
>  > > +
>  > > + The PMECC Controller is a programmable binary BCH (Bose, Chaudhuri
>  > > + and Hocquenghem) encoder/decoder. This controller can be used to
>  > > + generate redundancy information for both SLC and MLC NAND Flash
>  > > + devices.
>  > > +
>  > > + NB : hardware and software ECC schemes are incompatible.
>  > > + If you switch from one to another, you'll have to erase your
>  > > + mtd partition.
>  >
>  > Does it have to be a config option, can we avoid adding config options
>  > uless we really have to?
>
> Agree. The original MTD_NAND_ATMEL_ECC_HW can be reused. In driver, if
> the SoC has PMECC, it'll be used.

PMECC is not compatible with the old HW ECC engine. It currently needs 
around 700 lines of C code to make it work. If we do not have a way to 
exclude the PMECC related code at compiling time, my quick testing shows 
that the driver code size will be doubled if some old SoCs do not 
support it. This sounds not good. What's your opinion?

Thanks.

BR,
Eric

> Thanks.
>
> BR,
> Eric
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>




More information about the linux-arm-kernel mailing list