Re: [U-Boot] [PATCH] ARM: at91: Convert SPL_GENERATE_ATMEL_PMECC_HEADER to Kconfig

2019-01-18 Thread Derald D. Woods
On Fri, Jan 18, 2019 at 08:37:48AM +, eugen.hris...@microchip.com wrote:
> 
> 
> On 11.01.2019 18:53, Derald Woods wrote:
> > 
> > 
> > On Fri, Jan 11, 2019, 10:51 AM Derald Woods  >  wrote:
> > 
> > 
> > On Fri, Jan 11, 2019, 5:27 AM  >  wrote:
> > 
> > 
> > 
> > On 10.01.2019 03:00, Derald Woods wrote:
> >  > On Mon, Jan 7, 2019 at 3:40 AM  > 
> >  >  > >> wrote:
> >  >
> >  >     Hi Derald,
> >  >
> >  >     Thank you for the patch,
> >  >
> >  >     Some minor questions inline.
> >  >
> >  >
> >  >
> >  > Sorry for the late response. Family and day job take priority.
> >  >
> >  > The patch is the simplest technical conversion that I could
> > produce with
> >  > my board (SAMA5D3-XPLD) as the test platform. I was very
> > careful not to
> >  > touch anything unrelated. It is not intended to address
> > permutations
> >  > outside of the PMECC Kconfig scope. I have submitted these
> > type of
> >  > conversions to U-Boot in the past. Adding speculative things
> > is risky
> >  > when you only have one development board. The patch works
> > well, for me,
> >  > and addresses the original need. All items, in the patch, are
> > currently
> >  > in scope. If there are additions and/or modifications, feel
> > free to
> >  > modify the patch. It is complete from my perspective. I do
> > not have any
> >  > additional time to chase this any further. I have been
> > developing for
> >  > some time now and can handle an 'out of tree' patch, in my
> > environment,
> >  > until something better comes along. This patch is just my
> > contribution
> >  > to the process.
> > 
> > Hello Derald,
> > 
> >   From my point of view the PMECC header generation for SPL
> > should be
> > done if and only if the SPL is being placed in NAND flash namely
> > defconfigs having *nandflash* in the name.
> > 
> > Thus I disagree with enabling it on spiflash configurations
> > (like you
> > did for the *mmc* configurations looks OK)
> > 
> > 
> > The patch is about 'one' thing. Kconfig conversion. Things that you
> > are mentioning do not invalidate my patch. I tried not to add things
> > that were not there originally. That is generally discouraged scope
> > creep. The patch does its job in a provable manner with
> > 
> > 
> > 'without'
> > 
> > changing existing usage.
> 
> 
> Ok, I understand your point.
> Can you make the CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER depend on 
> NAND_BOOT though ? This way the errors cannot happen again.
> 


I agree.


> Also the other defconfigs need to depend on NAND if they are strict NAND 
> related.
> 


But are the existing configs that enable both SPL_GENERATE_ATMEL_PMECC_HEADER
and SPI_BOOT really valid?

It would appear that those entries may just be placeholders in the event
that an end-user enabled PMECC and NAND_BOOT for that particular board.

I could rework the patch to remove PMECC items from non-NAND_BOOT
configs. Comments could be used to preserve previous values. Does this sound
reasonable?

Additionally, I would make ATMEL_NAND_HW_PMECC dependent on ATMEL_NAND_HWECC
as it should be.

I can only test on the SAMA5D3-XPLD board.

Derald


> Maybe we can get more opinions from someone more familiar with the NAND 
> subsystem ? Adding Miquel and Boris.
> 
> Thanks,
> 
> Eugen
> 
> > 
> > Derald
> > 
> > 
> > If you have any reasons or arguments , or anyone else does, please
> > correct me.
> > 
> > If you do not have time to change the patch, that is OK, I can
> > take over
> > at some point when I have the time or someone else can pick and
> > rework a
> > little bit on that specific point and make a v2.
> > 
> > Thanks again,
> > 
> > Eugen
> > 
> >  >
> >  > Cheers,
> >  >
> >  > Derald
> >  >
> >  >
> >  >     On 15.12.2018 09:36, Derald D. Woods wrote:
> >  >      > This commit converts the following items to Kconfig:
> >  >      >
> >  >      > CONFIG_ATMEL_NAND_HWECC
> >  >      > CONFIG_ATMEL_NAND_HW_PMECC
> >  >      > CONFIG_PMECC_CAP
> >  >      > CONFIG_PMECC_SECTOR_SIZE
> >  >      > CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER
> >  >      >
> >  >      > [PMECC References]
> >  >      >
> > https://www.at91.com/linux4sam/bin/view/Linux4SAM/PmeccConfigure
> >  >   

Re: [U-Boot] [PATCH] ARM: at91: Convert SPL_GENERATE_ATMEL_PMECC_HEADER to Kconfig

2019-01-18 Thread Eugen.Hristev


On 11.01.2019 18:53, Derald Woods wrote:
> 
> 
> On Fri, Jan 11, 2019, 10:51 AM Derald Woods   wrote:
> 
> 
> On Fri, Jan 11, 2019, 5:27 AM   wrote:
> 
> 
> 
> On 10.01.2019 03:00, Derald Woods wrote:
>  > On Mon, Jan 7, 2019 at 3:40 AM  
>  >  >> wrote:
>  >
>  >     Hi Derald,
>  >
>  >     Thank you for the patch,
>  >
>  >     Some minor questions inline.
>  >
>  >
>  >
>  > Sorry for the late response. Family and day job take priority.
>  >
>  > The patch is the simplest technical conversion that I could
> produce with
>  > my board (SAMA5D3-XPLD) as the test platform. I was very
> careful not to
>  > touch anything unrelated. It is not intended to address
> permutations
>  > outside of the PMECC Kconfig scope. I have submitted these
> type of
>  > conversions to U-Boot in the past. Adding speculative things
> is risky
>  > when you only have one development board. The patch works
> well, for me,
>  > and addresses the original need. All items, in the patch, are
> currently
>  > in scope. If there are additions and/or modifications, feel
> free to
>  > modify the patch. It is complete from my perspective. I do
> not have any
>  > additional time to chase this any further. I have been
> developing for
>  > some time now and can handle an 'out of tree' patch, in my
> environment,
>  > until something better comes along. This patch is just my
> contribution
>  > to the process.
> 
> Hello Derald,
> 
>   From my point of view the PMECC header generation for SPL
> should be
> done if and only if the SPL is being placed in NAND flash namely
> defconfigs having *nandflash* in the name.
> 
> Thus I disagree with enabling it on spiflash configurations
> (like you
> did for the *mmc* configurations looks OK)
> 
> 
> The patch is about 'one' thing. Kconfig conversion. Things that you
> are mentioning do not invalidate my patch. I tried not to add things
> that were not there originally. That is generally discouraged scope
> creep. The patch does its job in a provable manner with
> 
> 
> 'without'
> 
> changing existing usage.


Ok, I understand your point.
Can you make the CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER depend on 
NAND_BOOT though ? This way the errors cannot happen again.

Also the other defconfigs need to depend on NAND if they are strict NAND 
related.

Maybe we can get more opinions from someone more familiar with the NAND 
subsystem ? Adding Miquel and Boris.

Thanks,

Eugen

> 
> Derald
> 
> 
> If you have any reasons or arguments , or anyone else does, please
> correct me.
> 
> If you do not have time to change the patch, that is OK, I can
> take over
> at some point when I have the time or someone else can pick and
> rework a
> little bit on that specific point and make a v2.
> 
> Thanks again,
> 
> Eugen
> 
>  >
>  > Cheers,
>  >
>  > Derald
>  >
>  >
>  >     On 15.12.2018 09:36, Derald D. Woods wrote:
>  >      > This commit converts the following items to Kconfig:
>  >      >
>  >      > CONFIG_ATMEL_NAND_HWECC
>  >      > CONFIG_ATMEL_NAND_HW_PMECC
>  >      > CONFIG_PMECC_CAP
>  >      > CONFIG_PMECC_SECTOR_SIZE
>  >      > CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER
>  >      >
>  >      > [PMECC References]
>  >      >
> https://www.at91.com/linux4sam/bin/view/Linux4SAM/PmeccConfigure
>  >      >
> https://www.at91.com/linux4sam/bin/view/Linux4SAM/AT91Bootstrap
>  >      >
>  >      > [Mailing List Thread]
>  >      >
> https://lists.denx.de/pipermail/u-boot/2018-December/350666.html
>  >      >
>  >      > Fixes: 5541543f ("configs: at91: Remove
> CONFIG_SYS_EXTRA_OPTIONS
>  >     assignment")
>  >      > Reported-by: Daniel Evans  
>  >      >>
>  >      > Cc: Eugen Hristev  
>  >      >>
>  >      > Signed-off-by: Derald D. Woods
> mailto:woods.techni...@gmail.com>
>  >      

Re: [U-Boot] [PATCH] ARM: at91: Convert SPL_GENERATE_ATMEL_PMECC_HEADER to Kconfig

2019-01-11 Thread Derald Woods
On Fri, Jan 11, 2019, 10:51 AM Derald Woods 
> On Fri, Jan 11, 2019, 5:27 AM 
>>
>>
>> On 10.01.2019 03:00, Derald Woods wrote:
>> > On Mon, Jan 7, 2019 at 3:40 AM > > > wrote:
>> >
>> > Hi Derald,
>> >
>> > Thank you for the patch,
>> >
>> > Some minor questions inline.
>> >
>> >
>> >
>> > Sorry for the late response. Family and day job take priority.
>> >
>> > The patch is the simplest technical conversion that I could produce
>> with
>> > my board (SAMA5D3-XPLD) as the test platform. I was very careful not to
>> > touch anything unrelated. It is not intended to address permutations
>> > outside of the PMECC Kconfig scope. I have submitted these type of
>> > conversions to U-Boot in the past. Adding speculative things is risky
>> > when you only have one development board. The patch works well, for me,
>> > and addresses the original need. All items, in the patch, are currently
>> > in scope. If there are additions and/or modifications, feel free to
>> > modify the patch. It is complete from my perspective. I do not have any
>> > additional time to chase this any further. I have been developing for
>> > some time now and can handle an 'out of tree' patch, in my environment,
>> > until something better comes along. This patch is just my contribution
>> > to the process.
>>
>> Hello Derald,
>>
>>  From my point of view the PMECC header generation for SPL should be
>> done if and only if the SPL is being placed in NAND flash namely
>> defconfigs having *nandflash* in the name.
>>
>> Thus I disagree with enabling it on spiflash configurations (like you
>> did for the *mmc* configurations looks OK)
>>
>
> The patch is about 'one' thing. Kconfig conversion. Things that you are
> mentioning do not invalidate my patch. I tried not to add things that were
> not there originally. That is generally discouraged scope creep. The patch
> does its job in a provable manner with
>

'without'

changing existing usage.
>
> Derald
>
>
> If you have any reasons or arguments , or anyone else does, please
>> correct me.
>>
>> If you do not have time to change the patch, that is OK, I can take over
>> at some point when I have the time or someone else can pick and rework a
>> little bit on that specific point and make a v2.
>>
>> Thanks again,
>>
>> Eugen
>>
>> >
>> > Cheers,
>> >
>> > Derald
>> >
>> >
>> > On 15.12.2018 09:36, Derald D. Woods wrote:
>> >  > This commit converts the following items to Kconfig:
>> >  >
>> >  > CONFIG_ATMEL_NAND_HWECC
>> >  > CONFIG_ATMEL_NAND_HW_PMECC
>> >  > CONFIG_PMECC_CAP
>> >  > CONFIG_PMECC_SECTOR_SIZE
>> >  > CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER
>> >  >
>> >  > [PMECC References]
>> >  > https://www.at91.com/linux4sam/bin/view/Linux4SAM/PmeccConfigure
>> >  > https://www.at91.com/linux4sam/bin/view/Linux4SAM/AT91Bootstrap
>> >  >
>> >  > [Mailing List Thread]
>> >  > https://lists.denx.de/pipermail/u-boot/2018-December/350666.html
>> >  >
>> >  > Fixes: 5541543f ("configs: at91: Remove CONFIG_SYS_EXTRA_OPTIONS
>> > assignment")
>> >  > Reported-by: Daniel Evans > > >
>> >  > Cc: Eugen Hristev > > >
>> >  > Signed-off-by: Derald D. Woods > > >
>> >  > ---
>> >  >   configs/at91sam9n12ek_mmc_defconfig  |  1 +
>> >  >   configs/at91sam9n12ek_nandflash_defconfig|  3 ++
>> >  >   configs/at91sam9n12ek_spiflash_defconfig |  3 ++
>> >  >   configs/at91sam9x5ek_dataflash_defconfig |  3 ++
>> >  >   configs/at91sam9x5ek_mmc_defconfig   |  1 +
>> >  >   configs/at91sam9x5ek_nandflash_defconfig |  3 ++
>> >  >   configs/at91sam9x5ek_spiflash_defconfig  |  3 ++
>> >  >   configs/sama5d3_xplained_mmc_defconfig   |  1 +
>> >  >   configs/sama5d3_xplained_nandflash_defconfig |  3 ++
>> >  >   configs/sama5d3xek_mmc_defconfig |  1 +
>> >  >   configs/sama5d3xek_nandflash_defconfig   |  3 ++
>> >  >   configs/sama5d3xek_spiflash_defconfig|  3 ++
>> >  >   configs/sama5d4_xplained_mmc_defconfig   |  1 +
>> >  >   configs/sama5d4_xplained_nandflash_defconfig |  3 ++
>> >  >   configs/sama5d4_xplained_spiflash_defconfig  |  3 ++
>> >  >   configs/sama5d4ek_mmc_defconfig  |  1 +
>> >  >   configs/sama5d4ek_nandflash_defconfig|  3 ++
>> >  >   configs/sama5d4ek_spiflash_defconfig |  3 ++
>> >  >   configs/wb45n_defconfig  |  3 ++
>> >  >   configs/wb50n_defconfig  |  3 ++
>> >  >   doc/README.atmel_pmecc   | 13 ---
>> >  >   drivers/mtd/nand/raw/Kconfig | 38
>> > 
>> >  >   include/configs/at91sam9n12ek.h  |  7 
>> >  >   include/configs/at91sam9x5ek.h 

Re: [U-Boot] [PATCH] ARM: at91: Convert SPL_GENERATE_ATMEL_PMECC_HEADER to Kconfig

2019-01-11 Thread Derald Woods
On Fri, Jan 11, 2019, 5:27 AM 
>
> On 10.01.2019 03:00, Derald Woods wrote:
> > On Mon, Jan 7, 2019 at 3:40 AM  > > wrote:
> >
> > Hi Derald,
> >
> > Thank you for the patch,
> >
> > Some minor questions inline.
> >
> >
> >
> > Sorry for the late response. Family and day job take priority.
> >
> > The patch is the simplest technical conversion that I could produce with
> > my board (SAMA5D3-XPLD) as the test platform. I was very careful not to
> > touch anything unrelated. It is not intended to address permutations
> > outside of the PMECC Kconfig scope. I have submitted these type of
> > conversions to U-Boot in the past. Adding speculative things is risky
> > when you only have one development board. The patch works well, for me,
> > and addresses the original need. All items, in the patch, are currently
> > in scope. If there are additions and/or modifications, feel free to
> > modify the patch. It is complete from my perspective. I do not have any
> > additional time to chase this any further. I have been developing for
> > some time now and can handle an 'out of tree' patch, in my environment,
> > until something better comes along. This patch is just my contribution
> > to the process.
>
> Hello Derald,
>
>  From my point of view the PMECC header generation for SPL should be
> done if and only if the SPL is being placed in NAND flash namely
> defconfigs having *nandflash* in the name.
>
> Thus I disagree with enabling it on spiflash configurations (like you
> did for the *mmc* configurations looks OK)
>

The patch is about 'one' thing. Kconfig conversion. Things that you are
mentioning do not invalidate my patch. I tried not to add things that were
not there originally. That is generally discouraged scope creep. The patch
does its job in a provable manner with changing existing usage.

Derald


If you have any reasons or arguments , or anyone else does, please
> correct me.
>
> If you do not have time to change the patch, that is OK, I can take over
> at some point when I have the time or someone else can pick and rework a
> little bit on that specific point and make a v2.
>
> Thanks again,
>
> Eugen
>
> >
> > Cheers,
> >
> > Derald
> >
> >
> > On 15.12.2018 09:36, Derald D. Woods wrote:
> >  > This commit converts the following items to Kconfig:
> >  >
> >  > CONFIG_ATMEL_NAND_HWECC
> >  > CONFIG_ATMEL_NAND_HW_PMECC
> >  > CONFIG_PMECC_CAP
> >  > CONFIG_PMECC_SECTOR_SIZE
> >  > CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER
> >  >
> >  > [PMECC References]
> >  > https://www.at91.com/linux4sam/bin/view/Linux4SAM/PmeccConfigure
> >  > https://www.at91.com/linux4sam/bin/view/Linux4SAM/AT91Bootstrap
> >  >
> >  > [Mailing List Thread]
> >  > https://lists.denx.de/pipermail/u-boot/2018-December/350666.html
> >  >
> >  > Fixes: 5541543f ("configs: at91: Remove CONFIG_SYS_EXTRA_OPTIONS
> > assignment")
> >  > Reported-by: Daniel Evans  > >
> >  > Cc: Eugen Hristev  > >
> >  > Signed-off-by: Derald D. Woods  > >
> >  > ---
> >  >   configs/at91sam9n12ek_mmc_defconfig  |  1 +
> >  >   configs/at91sam9n12ek_nandflash_defconfig|  3 ++
> >  >   configs/at91sam9n12ek_spiflash_defconfig |  3 ++
> >  >   configs/at91sam9x5ek_dataflash_defconfig |  3 ++
> >  >   configs/at91sam9x5ek_mmc_defconfig   |  1 +
> >  >   configs/at91sam9x5ek_nandflash_defconfig |  3 ++
> >  >   configs/at91sam9x5ek_spiflash_defconfig  |  3 ++
> >  >   configs/sama5d3_xplained_mmc_defconfig   |  1 +
> >  >   configs/sama5d3_xplained_nandflash_defconfig |  3 ++
> >  >   configs/sama5d3xek_mmc_defconfig |  1 +
> >  >   configs/sama5d3xek_nandflash_defconfig   |  3 ++
> >  >   configs/sama5d3xek_spiflash_defconfig|  3 ++
> >  >   configs/sama5d4_xplained_mmc_defconfig   |  1 +
> >  >   configs/sama5d4_xplained_nandflash_defconfig |  3 ++
> >  >   configs/sama5d4_xplained_spiflash_defconfig  |  3 ++
> >  >   configs/sama5d4ek_mmc_defconfig  |  1 +
> >  >   configs/sama5d4ek_nandflash_defconfig|  3 ++
> >  >   configs/sama5d4ek_spiflash_defconfig |  3 ++
> >  >   configs/wb45n_defconfig  |  3 ++
> >  >   configs/wb50n_defconfig  |  3 ++
> >  >   doc/README.atmel_pmecc   | 13 ---
> >  >   drivers/mtd/nand/raw/Kconfig | 38
> > 
> >  >   include/configs/at91sam9n12ek.h  |  7 
> >  >   include/configs/at91sam9x5ek.h   |  7 
> >  >   include/configs/sama5d3_xplained.h   |  7 
> >  >   include/configs/sama5d3xek.h |  7 
> >  >   

Re: [U-Boot] [PATCH] ARM: at91: Convert SPL_GENERATE_ATMEL_PMECC_HEADER to Kconfig

2019-01-11 Thread Eugen.Hristev


On 10.01.2019 03:00, Derald Woods wrote:
> On Mon, Jan 7, 2019 at 3:40 AM  > wrote:
> 
> Hi Derald,
> 
> Thank you for the patch,
> 
> Some minor questions inline.
> 
> 
> 
> Sorry for the late response. Family and day job take priority.
> 
> The patch is the simplest technical conversion that I could produce with 
> my board (SAMA5D3-XPLD) as the test platform. I was very careful not to 
> touch anything unrelated. It is not intended to address permutations 
> outside of the PMECC Kconfig scope. I have submitted these type of 
> conversions to U-Boot in the past. Adding speculative things is risky 
> when you only have one development board. The patch works well, for me, 
> and addresses the original need. All items, in the patch, are currently 
> in scope. If there are additions and/or modifications, feel free to 
> modify the patch. It is complete from my perspective. I do not have any 
> additional time to chase this any further. I have been developing for 
> some time now and can handle an 'out of tree' patch, in my environment, 
> until something better comes along. This patch is just my contribution 
> to the process.

Hello Derald,

 From my point of view the PMECC header generation for SPL should be 
done if and only if the SPL is being placed in NAND flash namely 
defconfigs having *nandflash* in the name.

Thus I disagree with enabling it on spiflash configurations (like you 
did for the *mmc* configurations looks OK)

If you have any reasons or arguments , or anyone else does, please 
correct me.

If you do not have time to change the patch, that is OK, I can take over 
at some point when I have the time or someone else can pick and rework a 
little bit on that specific point and make a v2.

Thanks again,

Eugen

> 
> Cheers,
> 
> Derald
> 
> 
> On 15.12.2018 09:36, Derald D. Woods wrote:
>  > This commit converts the following items to Kconfig:
>  >
>  > CONFIG_ATMEL_NAND_HWECC
>  > CONFIG_ATMEL_NAND_HW_PMECC
>  > CONFIG_PMECC_CAP
>  > CONFIG_PMECC_SECTOR_SIZE
>  > CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER
>  >
>  > [PMECC References]
>  > https://www.at91.com/linux4sam/bin/view/Linux4SAM/PmeccConfigure
>  > https://www.at91.com/linux4sam/bin/view/Linux4SAM/AT91Bootstrap
>  >
>  > [Mailing List Thread]
>  > https://lists.denx.de/pipermail/u-boot/2018-December/350666.html
>  >
>  > Fixes: 5541543f ("configs: at91: Remove CONFIG_SYS_EXTRA_OPTIONS
> assignment")
>  > Reported-by: Daniel Evans  >
>  > Cc: Eugen Hristev  >
>  > Signed-off-by: Derald D. Woods  >
>  > ---
>  >   configs/at91sam9n12ek_mmc_defconfig          |  1 +
>  >   configs/at91sam9n12ek_nandflash_defconfig    |  3 ++
>  >   configs/at91sam9n12ek_spiflash_defconfig     |  3 ++
>  >   configs/at91sam9x5ek_dataflash_defconfig     |  3 ++
>  >   configs/at91sam9x5ek_mmc_defconfig           |  1 +
>  >   configs/at91sam9x5ek_nandflash_defconfig     |  3 ++
>  >   configs/at91sam9x5ek_spiflash_defconfig      |  3 ++
>  >   configs/sama5d3_xplained_mmc_defconfig       |  1 +
>  >   configs/sama5d3_xplained_nandflash_defconfig |  3 ++
>  >   configs/sama5d3xek_mmc_defconfig             |  1 +
>  >   configs/sama5d3xek_nandflash_defconfig       |  3 ++
>  >   configs/sama5d3xek_spiflash_defconfig        |  3 ++
>  >   configs/sama5d4_xplained_mmc_defconfig       |  1 +
>  >   configs/sama5d4_xplained_nandflash_defconfig |  3 ++
>  >   configs/sama5d4_xplained_spiflash_defconfig  |  3 ++
>  >   configs/sama5d4ek_mmc_defconfig              |  1 +
>  >   configs/sama5d4ek_nandflash_defconfig        |  3 ++
>  >   configs/sama5d4ek_spiflash_defconfig         |  3 ++
>  >   configs/wb45n_defconfig                      |  3 ++
>  >   configs/wb50n_defconfig                      |  3 ++
>  >   doc/README.atmel_pmecc                       | 13 ---
>  >   drivers/mtd/nand/raw/Kconfig                 | 38
> 
>  >   include/configs/at91sam9n12ek.h              |  7 
>  >   include/configs/at91sam9x5ek.h               |  7 
>  >   include/configs/sama5d3_xplained.h           |  7 
>  >   include/configs/sama5d3xek.h                 |  7 
>  >   include/configs/sama5d4_xplained.h           |  6 
>  >   include/configs/sama5d4ek.h                  |  6 
>  >   include/configs/wb45n.h                      |  7 
>  >   include/configs/wb50n.h                      |  6 
>  >   scripts/config_whitelist.txt                 |  5 ---
>  >   31 files changed, 92 insertions(+), 65 deletions(-)
>  >
>  > diff --git a/configs/at91sam9n12ek_mmc_defconfig
> b/configs/at91sam9n12ek_mmc_defconfig
>  > index 

Re: [U-Boot] [PATCH] ARM: at91: Convert SPL_GENERATE_ATMEL_PMECC_HEADER to Kconfig

2019-01-09 Thread Derald Woods
On Mon, Jan 7, 2019 at 3:40 AM  wrote:

> Hi Derald,
>
> Thank you for the patch,
>
> Some minor questions inline.
>


Sorry for the late response. Family and day job take priority.

The patch is the simplest technical conversion that I could produce with my
board (SAMA5D3-XPLD) as the test platform. I was very careful not to touch
anything unrelated. It is not intended to address permutations outside of
the PMECC Kconfig scope. I have submitted these type of conversions to
U-Boot in the past. Adding speculative things is risky when you only have
one development board. The patch works well, for me, and addresses the
original need. All items, in the patch, are currently in scope. If there
are additions and/or modifications, feel free to modify the patch. It is
complete from my perspective. I do not have any additional time to chase
this any further. I have been developing for some time now and can handle
an 'out of tree' patch, in my environment, until something better comes
along. This patch is just my contribution to the process.

Cheers,

Derald



>
> On 15.12.2018 09:36, Derald D. Woods wrote:
> > This commit converts the following items to Kconfig:
> >
> > CONFIG_ATMEL_NAND_HWECC
> > CONFIG_ATMEL_NAND_HW_PMECC
> > CONFIG_PMECC_CAP
> > CONFIG_PMECC_SECTOR_SIZE
> > CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER
> >
> > [PMECC References]
> > https://www.at91.com/linux4sam/bin/view/Linux4SAM/PmeccConfigure
> > https://www.at91.com/linux4sam/bin/view/Linux4SAM/AT91Bootstrap
> >
> > [Mailing List Thread]
> > https://lists.denx.de/pipermail/u-boot/2018-December/350666.html
> >
> > Fixes: 5541543f ("configs: at91: Remove CONFIG_SYS_EXTRA_OPTIONS
> assignment")
> > Reported-by: Daniel Evans 
> > Cc: Eugen Hristev 
> > Signed-off-by: Derald D. Woods 
> > ---
> >   configs/at91sam9n12ek_mmc_defconfig  |  1 +
> >   configs/at91sam9n12ek_nandflash_defconfig|  3 ++
> >   configs/at91sam9n12ek_spiflash_defconfig |  3 ++
> >   configs/at91sam9x5ek_dataflash_defconfig |  3 ++
> >   configs/at91sam9x5ek_mmc_defconfig   |  1 +
> >   configs/at91sam9x5ek_nandflash_defconfig |  3 ++
> >   configs/at91sam9x5ek_spiflash_defconfig  |  3 ++
> >   configs/sama5d3_xplained_mmc_defconfig   |  1 +
> >   configs/sama5d3_xplained_nandflash_defconfig |  3 ++
> >   configs/sama5d3xek_mmc_defconfig |  1 +
> >   configs/sama5d3xek_nandflash_defconfig   |  3 ++
> >   configs/sama5d3xek_spiflash_defconfig|  3 ++
> >   configs/sama5d4_xplained_mmc_defconfig   |  1 +
> >   configs/sama5d4_xplained_nandflash_defconfig |  3 ++
> >   configs/sama5d4_xplained_spiflash_defconfig  |  3 ++
> >   configs/sama5d4ek_mmc_defconfig  |  1 +
> >   configs/sama5d4ek_nandflash_defconfig|  3 ++
> >   configs/sama5d4ek_spiflash_defconfig |  3 ++
> >   configs/wb45n_defconfig  |  3 ++
> >   configs/wb50n_defconfig  |  3 ++
> >   doc/README.atmel_pmecc   | 13 ---
> >   drivers/mtd/nand/raw/Kconfig | 38 
> >   include/configs/at91sam9n12ek.h  |  7 
> >   include/configs/at91sam9x5ek.h   |  7 
> >   include/configs/sama5d3_xplained.h   |  7 
> >   include/configs/sama5d3xek.h |  7 
> >   include/configs/sama5d4_xplained.h   |  6 
> >   include/configs/sama5d4ek.h  |  6 
> >   include/configs/wb45n.h  |  7 
> >   include/configs/wb50n.h  |  6 
> >   scripts/config_whitelist.txt |  5 ---
> >   31 files changed, 92 insertions(+), 65 deletions(-)
> >
> > diff --git a/configs/at91sam9n12ek_mmc_defconfig
> b/configs/at91sam9n12ek_mmc_defconfig
> > index 6b2cfe9c42..7b46eb498d 100644
> > --- a/configs/at91sam9n12ek_mmc_defconfig
> > +++ b/configs/at91sam9n12ek_mmc_defconfig
> > @@ -2,6 +2,7 @@ CONFIG_ARM=y
> >   CONFIG_ARCH_AT91=y
> >   CONFIG_SYS_TEXT_BASE=0x26f0
> >   CONFIG_TARGET_AT91SAM9N12EK=y
> > +# CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER is not set
> >   CONFIG_SYS_MALLOC_F_LEN=0x2000
> >   CONFIG_DEBUG_UART_BOARD_INIT=y
> >   CONFIG_DEBUG_UART_BASE=0xf200
> > diff --git a/configs/at91sam9n12ek_nandflash_defconfig
> b/configs/at91sam9n12ek_nandflash_defconfig
> > index 354c24ff16..4e34a517fd 100644
> > --- a/configs/at91sam9n12ek_nandflash_defconfig
> > +++ b/configs/at91sam9n12ek_nandflash_defconfig
> > @@ -2,6 +2,9 @@ CONFIG_ARM=y
> >   CONFIG_ARCH_AT91=y
> >   CONFIG_SYS_TEXT_BASE=0x26f0
> >   CONFIG_TARGET_AT91SAM9N12EK=y
> > +CONFIG_PMECC_CAP=2
> > +CONFIG_PMECC_SECTOR_SIZE=512
> > +CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER=y
> >   CONFIG_SYS_MALLOC_F_LEN=0x2000
> >   CONFIG_DEBUG_UART_BOARD_INIT=y
> >   CONFIG_DEBUG_UART_BASE=0xf200
> > diff --git a/configs/at91sam9n12ek_spiflash_defconfig
> b/configs/at91sam9n12ek_spiflash_defconfig
> > index 63889355bf..500c3ab088 100644
> > --- 

Re: [U-Boot] [PATCH] ARM: at91: Convert SPL_GENERATE_ATMEL_PMECC_HEADER to Kconfig

2019-01-07 Thread Eugen.Hristev
Hi Derald,

Thank you for the patch,

Some minor questions inline.

On 15.12.2018 09:36, Derald D. Woods wrote:
> This commit converts the following items to Kconfig:
> 
> CONFIG_ATMEL_NAND_HWECC
> CONFIG_ATMEL_NAND_HW_PMECC
> CONFIG_PMECC_CAP
> CONFIG_PMECC_SECTOR_SIZE
> CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER
> 
> [PMECC References]
> https://www.at91.com/linux4sam/bin/view/Linux4SAM/PmeccConfigure
> https://www.at91.com/linux4sam/bin/view/Linux4SAM/AT91Bootstrap
> 
> [Mailing List Thread]
> https://lists.denx.de/pipermail/u-boot/2018-December/350666.html
> 
> Fixes: 5541543f ("configs: at91: Remove CONFIG_SYS_EXTRA_OPTIONS assignment")
> Reported-by: Daniel Evans 
> Cc: Eugen Hristev 
> Signed-off-by: Derald D. Woods 
> ---
>   configs/at91sam9n12ek_mmc_defconfig  |  1 +
>   configs/at91sam9n12ek_nandflash_defconfig|  3 ++
>   configs/at91sam9n12ek_spiflash_defconfig |  3 ++
>   configs/at91sam9x5ek_dataflash_defconfig |  3 ++
>   configs/at91sam9x5ek_mmc_defconfig   |  1 +
>   configs/at91sam9x5ek_nandflash_defconfig |  3 ++
>   configs/at91sam9x5ek_spiflash_defconfig  |  3 ++
>   configs/sama5d3_xplained_mmc_defconfig   |  1 +
>   configs/sama5d3_xplained_nandflash_defconfig |  3 ++
>   configs/sama5d3xek_mmc_defconfig |  1 +
>   configs/sama5d3xek_nandflash_defconfig   |  3 ++
>   configs/sama5d3xek_spiflash_defconfig|  3 ++
>   configs/sama5d4_xplained_mmc_defconfig   |  1 +
>   configs/sama5d4_xplained_nandflash_defconfig |  3 ++
>   configs/sama5d4_xplained_spiflash_defconfig  |  3 ++
>   configs/sama5d4ek_mmc_defconfig  |  1 +
>   configs/sama5d4ek_nandflash_defconfig|  3 ++
>   configs/sama5d4ek_spiflash_defconfig |  3 ++
>   configs/wb45n_defconfig  |  3 ++
>   configs/wb50n_defconfig  |  3 ++
>   doc/README.atmel_pmecc   | 13 ---
>   drivers/mtd/nand/raw/Kconfig | 38 
>   include/configs/at91sam9n12ek.h  |  7 
>   include/configs/at91sam9x5ek.h   |  7 
>   include/configs/sama5d3_xplained.h   |  7 
>   include/configs/sama5d3xek.h |  7 
>   include/configs/sama5d4_xplained.h   |  6 
>   include/configs/sama5d4ek.h  |  6 
>   include/configs/wb45n.h  |  7 
>   include/configs/wb50n.h  |  6 
>   scripts/config_whitelist.txt |  5 ---
>   31 files changed, 92 insertions(+), 65 deletions(-)
> 
> diff --git a/configs/at91sam9n12ek_mmc_defconfig 
> b/configs/at91sam9n12ek_mmc_defconfig
> index 6b2cfe9c42..7b46eb498d 100644
> --- a/configs/at91sam9n12ek_mmc_defconfig
> +++ b/configs/at91sam9n12ek_mmc_defconfig
> @@ -2,6 +2,7 @@ CONFIG_ARM=y
>   CONFIG_ARCH_AT91=y
>   CONFIG_SYS_TEXT_BASE=0x26f0
>   CONFIG_TARGET_AT91SAM9N12EK=y
> +# CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER is not set
>   CONFIG_SYS_MALLOC_F_LEN=0x2000
>   CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_BASE=0xf200
> diff --git a/configs/at91sam9n12ek_nandflash_defconfig 
> b/configs/at91sam9n12ek_nandflash_defconfig
> index 354c24ff16..4e34a517fd 100644
> --- a/configs/at91sam9n12ek_nandflash_defconfig
> +++ b/configs/at91sam9n12ek_nandflash_defconfig
> @@ -2,6 +2,9 @@ CONFIG_ARM=y
>   CONFIG_ARCH_AT91=y
>   CONFIG_SYS_TEXT_BASE=0x26f0
>   CONFIG_TARGET_AT91SAM9N12EK=y
> +CONFIG_PMECC_CAP=2
> +CONFIG_PMECC_SECTOR_SIZE=512
> +CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER=y
>   CONFIG_SYS_MALLOC_F_LEN=0x2000
>   CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_BASE=0xf200
> diff --git a/configs/at91sam9n12ek_spiflash_defconfig 
> b/configs/at91sam9n12ek_spiflash_defconfig
> index 63889355bf..500c3ab088 100644
> --- a/configs/at91sam9n12ek_spiflash_defconfig
> +++ b/configs/at91sam9n12ek_spiflash_defconfig
> @@ -2,6 +2,9 @@ CONFIG_ARM=y
>   CONFIG_ARCH_AT91=y
>   CONFIG_SYS_TEXT_BASE=0x26f0
>   CONFIG_TARGET_AT91SAM9N12EK=y
> +CONFIG_PMECC_CAP=2
> +CONFIG_PMECC_SECTOR_SIZE=512
> +CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER=y

Do we need to generate the PMECC header for SPI_BOOT configurations ?
I would say this would be required only for NAND_BOOT

>   CONFIG_SYS_MALLOC_F_LEN=0x2000
>   CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_BASE=0xf200
> diff --git a/configs/at91sam9x5ek_dataflash_defconfig 
> b/configs/at91sam9x5ek_dataflash_defconfig
> index dc13509715..60d865cc23 100644
> --- a/configs/at91sam9x5ek_dataflash_defconfig
> +++ b/configs/at91sam9x5ek_dataflash_defconfig
> @@ -2,6 +2,9 @@ CONFIG_ARM=y
>   CONFIG_ARCH_AT91=y
>   CONFIG_SYS_TEXT_BASE=0x26f0
>   CONFIG_TARGET_AT91SAM9X5EK=y
> +CONFIG_PMECC_CAP=2
> +CONFIG_PMECC_SECTOR_SIZE=512
> +CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER=y
>   CONFIG_SYS_MALLOC_F_LEN=0x2000
>   CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_BASE=0xf200
> diff --git a/configs/at91sam9x5ek_mmc_defconfig 
> 

Re: [U-Boot] [PATCH] ARM: at91: Convert SPL_GENERATE_ATMEL_PMECC_HEADER to Kconfig

2018-12-27 Thread Derald Woods
On Sat, Dec 15, 2018 at 1:37 AM Derald D. Woods 
wrote:

> This commit converts the following items to Kconfig:
>
> CONFIG_ATMEL_NAND_HWECC
> CONFIG_ATMEL_NAND_HW_PMECC
> CONFIG_PMECC_CAP
> CONFIG_PMECC_SECTOR_SIZE
> CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER
>
> [PMECC References]
> https://www.at91.com/linux4sam/bin/view/Linux4SAM/PmeccConfigure
> https://www.at91.com/linux4sam/bin/view/Linux4SAM/AT91Bootstrap
>
> [Mailing List Thread]
> https://lists.denx.de/pipermail/u-boot/2018-December/350666.html
>
> Fixes: 5541543f ("configs: at91: Remove CONFIG_SYS_EXTRA_OPTIONS
> assignment")
> Reported-by: Daniel Evans 
> Cc: Eugen Hristev 
> Signed-off-by: Derald D. Woods 
>


Any concerns about this Kconfig conversion?

Derald




> ---
>  configs/at91sam9n12ek_mmc_defconfig  |  1 +
>  configs/at91sam9n12ek_nandflash_defconfig|  3 ++
>  configs/at91sam9n12ek_spiflash_defconfig |  3 ++
>  configs/at91sam9x5ek_dataflash_defconfig |  3 ++
>  configs/at91sam9x5ek_mmc_defconfig   |  1 +
>  configs/at91sam9x5ek_nandflash_defconfig |  3 ++
>  configs/at91sam9x5ek_spiflash_defconfig  |  3 ++
>  configs/sama5d3_xplained_mmc_defconfig   |  1 +
>  configs/sama5d3_xplained_nandflash_defconfig |  3 ++
>  configs/sama5d3xek_mmc_defconfig |  1 +
>  configs/sama5d3xek_nandflash_defconfig   |  3 ++
>  configs/sama5d3xek_spiflash_defconfig|  3 ++
>  configs/sama5d4_xplained_mmc_defconfig   |  1 +
>  configs/sama5d4_xplained_nandflash_defconfig |  3 ++
>  configs/sama5d4_xplained_spiflash_defconfig  |  3 ++
>  configs/sama5d4ek_mmc_defconfig  |  1 +
>  configs/sama5d4ek_nandflash_defconfig|  3 ++
>  configs/sama5d4ek_spiflash_defconfig |  3 ++
>  configs/wb45n_defconfig  |  3 ++
>  configs/wb50n_defconfig  |  3 ++
>  doc/README.atmel_pmecc   | 13 ---
>  drivers/mtd/nand/raw/Kconfig | 38 
>  include/configs/at91sam9n12ek.h  |  7 
>  include/configs/at91sam9x5ek.h   |  7 
>  include/configs/sama5d3_xplained.h   |  7 
>  include/configs/sama5d3xek.h |  7 
>  include/configs/sama5d4_xplained.h   |  6 
>  include/configs/sama5d4ek.h  |  6 
>  include/configs/wb45n.h  |  7 
>  include/configs/wb50n.h  |  6 
>  scripts/config_whitelist.txt |  5 ---
>  31 files changed, 92 insertions(+), 65 deletions(-)
>
> diff --git a/configs/at91sam9n12ek_mmc_defconfig
> b/configs/at91sam9n12ek_mmc_defconfig
> index 6b2cfe9c42..7b46eb498d 100644
> --- a/configs/at91sam9n12ek_mmc_defconfig
> +++ b/configs/at91sam9n12ek_mmc_defconfig
> @@ -2,6 +2,7 @@ CONFIG_ARM=y
>  CONFIG_ARCH_AT91=y
>  CONFIG_SYS_TEXT_BASE=0x26f0
>  CONFIG_TARGET_AT91SAM9N12EK=y
> +# CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER is not set
>  CONFIG_SYS_MALLOC_F_LEN=0x2000
>  CONFIG_DEBUG_UART_BOARD_INIT=y
>  CONFIG_DEBUG_UART_BASE=0xf200
> diff --git a/configs/at91sam9n12ek_nandflash_defconfig
> b/configs/at91sam9n12ek_nandflash_defconfig
> index 354c24ff16..4e34a517fd 100644
> --- a/configs/at91sam9n12ek_nandflash_defconfig
> +++ b/configs/at91sam9n12ek_nandflash_defconfig
> @@ -2,6 +2,9 @@ CONFIG_ARM=y
>  CONFIG_ARCH_AT91=y
>  CONFIG_SYS_TEXT_BASE=0x26f0
>  CONFIG_TARGET_AT91SAM9N12EK=y
> +CONFIG_PMECC_CAP=2
> +CONFIG_PMECC_SECTOR_SIZE=512
> +CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER=y
>  CONFIG_SYS_MALLOC_F_LEN=0x2000
>  CONFIG_DEBUG_UART_BOARD_INIT=y
>  CONFIG_DEBUG_UART_BASE=0xf200
> diff --git a/configs/at91sam9n12ek_spiflash_defconfig
> b/configs/at91sam9n12ek_spiflash_defconfig
> index 63889355bf..500c3ab088 100644
> --- a/configs/at91sam9n12ek_spiflash_defconfig
> +++ b/configs/at91sam9n12ek_spiflash_defconfig
> @@ -2,6 +2,9 @@ CONFIG_ARM=y
>  CONFIG_ARCH_AT91=y
>  CONFIG_SYS_TEXT_BASE=0x26f0
>  CONFIG_TARGET_AT91SAM9N12EK=y
> +CONFIG_PMECC_CAP=2
> +CONFIG_PMECC_SECTOR_SIZE=512
> +CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER=y
>  CONFIG_SYS_MALLOC_F_LEN=0x2000
>  CONFIG_DEBUG_UART_BOARD_INIT=y
>  CONFIG_DEBUG_UART_BASE=0xf200
> diff --git a/configs/at91sam9x5ek_dataflash_defconfig
> b/configs/at91sam9x5ek_dataflash_defconfig
> index dc13509715..60d865cc23 100644
> --- a/configs/at91sam9x5ek_dataflash_defconfig
> +++ b/configs/at91sam9x5ek_dataflash_defconfig
> @@ -2,6 +2,9 @@ CONFIG_ARM=y
>  CONFIG_ARCH_AT91=y
>  CONFIG_SYS_TEXT_BASE=0x26f0
>  CONFIG_TARGET_AT91SAM9X5EK=y
> +CONFIG_PMECC_CAP=2
> +CONFIG_PMECC_SECTOR_SIZE=512
> +CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER=y
>  CONFIG_SYS_MALLOC_F_LEN=0x2000
>  CONFIG_DEBUG_UART_BOARD_INIT=y
>  CONFIG_DEBUG_UART_BASE=0xf200
> diff --git a/configs/at91sam9x5ek_mmc_defconfig
> b/configs/at91sam9x5ek_mmc_defconfig
> index ff86f93e61..75f7fbd199 100644
> --- a/configs/at91sam9x5ek_mmc_defconfig
> +++ b/configs/at91sam9x5ek_mmc_defconfig
> @@ -2,6 +2,7 @@ CONFIG_ARM=y
>  

[U-Boot] [PATCH] ARM: at91: Convert SPL_GENERATE_ATMEL_PMECC_HEADER to Kconfig

2018-12-14 Thread Derald D. Woods
This commit converts the following items to Kconfig:

CONFIG_ATMEL_NAND_HWECC
CONFIG_ATMEL_NAND_HW_PMECC
CONFIG_PMECC_CAP
CONFIG_PMECC_SECTOR_SIZE
CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER

[PMECC References]
https://www.at91.com/linux4sam/bin/view/Linux4SAM/PmeccConfigure
https://www.at91.com/linux4sam/bin/view/Linux4SAM/AT91Bootstrap

[Mailing List Thread]
https://lists.denx.de/pipermail/u-boot/2018-December/350666.html

Fixes: 5541543f ("configs: at91: Remove CONFIG_SYS_EXTRA_OPTIONS assignment")
Reported-by: Daniel Evans 
Cc: Eugen Hristev 
Signed-off-by: Derald D. Woods 
---
 configs/at91sam9n12ek_mmc_defconfig  |  1 +
 configs/at91sam9n12ek_nandflash_defconfig|  3 ++
 configs/at91sam9n12ek_spiflash_defconfig |  3 ++
 configs/at91sam9x5ek_dataflash_defconfig |  3 ++
 configs/at91sam9x5ek_mmc_defconfig   |  1 +
 configs/at91sam9x5ek_nandflash_defconfig |  3 ++
 configs/at91sam9x5ek_spiflash_defconfig  |  3 ++
 configs/sama5d3_xplained_mmc_defconfig   |  1 +
 configs/sama5d3_xplained_nandflash_defconfig |  3 ++
 configs/sama5d3xek_mmc_defconfig |  1 +
 configs/sama5d3xek_nandflash_defconfig   |  3 ++
 configs/sama5d3xek_spiflash_defconfig|  3 ++
 configs/sama5d4_xplained_mmc_defconfig   |  1 +
 configs/sama5d4_xplained_nandflash_defconfig |  3 ++
 configs/sama5d4_xplained_spiflash_defconfig  |  3 ++
 configs/sama5d4ek_mmc_defconfig  |  1 +
 configs/sama5d4ek_nandflash_defconfig|  3 ++
 configs/sama5d4ek_spiflash_defconfig |  3 ++
 configs/wb45n_defconfig  |  3 ++
 configs/wb50n_defconfig  |  3 ++
 doc/README.atmel_pmecc   | 13 ---
 drivers/mtd/nand/raw/Kconfig | 38 
 include/configs/at91sam9n12ek.h  |  7 
 include/configs/at91sam9x5ek.h   |  7 
 include/configs/sama5d3_xplained.h   |  7 
 include/configs/sama5d3xek.h |  7 
 include/configs/sama5d4_xplained.h   |  6 
 include/configs/sama5d4ek.h  |  6 
 include/configs/wb45n.h  |  7 
 include/configs/wb50n.h  |  6 
 scripts/config_whitelist.txt |  5 ---
 31 files changed, 92 insertions(+), 65 deletions(-)

diff --git a/configs/at91sam9n12ek_mmc_defconfig 
b/configs/at91sam9n12ek_mmc_defconfig
index 6b2cfe9c42..7b46eb498d 100644
--- a/configs/at91sam9n12ek_mmc_defconfig
+++ b/configs/at91sam9n12ek_mmc_defconfig
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_SYS_TEXT_BASE=0x26f0
 CONFIG_TARGET_AT91SAM9N12EK=y
+# CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER is not set
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_BASE=0xf200
diff --git a/configs/at91sam9n12ek_nandflash_defconfig 
b/configs/at91sam9n12ek_nandflash_defconfig
index 354c24ff16..4e34a517fd 100644
--- a/configs/at91sam9n12ek_nandflash_defconfig
+++ b/configs/at91sam9n12ek_nandflash_defconfig
@@ -2,6 +2,9 @@ CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_SYS_TEXT_BASE=0x26f0
 CONFIG_TARGET_AT91SAM9N12EK=y
+CONFIG_PMECC_CAP=2
+CONFIG_PMECC_SECTOR_SIZE=512
+CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_BASE=0xf200
diff --git a/configs/at91sam9n12ek_spiflash_defconfig 
b/configs/at91sam9n12ek_spiflash_defconfig
index 63889355bf..500c3ab088 100644
--- a/configs/at91sam9n12ek_spiflash_defconfig
+++ b/configs/at91sam9n12ek_spiflash_defconfig
@@ -2,6 +2,9 @@ CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_SYS_TEXT_BASE=0x26f0
 CONFIG_TARGET_AT91SAM9N12EK=y
+CONFIG_PMECC_CAP=2
+CONFIG_PMECC_SECTOR_SIZE=512
+CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_BASE=0xf200
diff --git a/configs/at91sam9x5ek_dataflash_defconfig 
b/configs/at91sam9x5ek_dataflash_defconfig
index dc13509715..60d865cc23 100644
--- a/configs/at91sam9x5ek_dataflash_defconfig
+++ b/configs/at91sam9x5ek_dataflash_defconfig
@@ -2,6 +2,9 @@ CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_SYS_TEXT_BASE=0x26f0
 CONFIG_TARGET_AT91SAM9X5EK=y
+CONFIG_PMECC_CAP=2
+CONFIG_PMECC_SECTOR_SIZE=512
+CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_BASE=0xf200
diff --git a/configs/at91sam9x5ek_mmc_defconfig 
b/configs/at91sam9x5ek_mmc_defconfig
index ff86f93e61..75f7fbd199 100644
--- a/configs/at91sam9x5ek_mmc_defconfig
+++ b/configs/at91sam9x5ek_mmc_defconfig
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_SYS_TEXT_BASE=0x26f0
 CONFIG_TARGET_AT91SAM9X5EK=y
+# CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER is not set
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_BASE=0xf200
diff --git a/configs/at91sam9x5ek_nandflash_defconfig 
b/configs/at91sam9x5ek_nandflash_defconfig
index