public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Andreas Bießmann" <andreas.devel@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 2/3] arm:at91: enable ROM loadable atmel image
Date: Mon, 19 May 2014 09:48:08 +0200	[thread overview]
Message-ID: <5379B738.6080800@gmail.com> (raw)
In-Reply-To: <537976DA.5070508@atmel.com>

Hi Bo,

On 05/19/2014 05:13 AM, Bo Shen wrote:
> On 05/16/2014 05:59 PM, Andreas Bie?mann wrote:
>> For sama5d3xek we need to modify the SPL image for correct detection
>> by ROM
>> code.
>>
>> Signed-off-by: Andreas Bie?mann <andreas.devel@googlemail.com>
>> ---
>>
>> Changes in v2:
>> * add -n switch to mkimage for PMECC type NAND and CONFIG_SYS_NANDFLASH
>>
>>   arch/arm/cpu/armv7/at91/config.mk |   10 ++++++++++
>>   doc/README.atmel_pmecc            |   30 ++++++++++++++++++++++++++++++
>>   spl/Makefile                      |   18 ++++++++++++++++++
>>   3 files changed, 58 insertions(+)
>>   create mode 100644 arch/arm/cpu/armv7/at91/config.mk
>>

>> diff --git a/doc/README.atmel_pmecc b/doc/README.atmel_pmecc
>> index cf8373b..5a93123 100644
>> --- a/doc/README.atmel_pmecc
>> +++ b/doc/README.atmel_pmecc
>> @@ -27,3 +27,33 @@ Take AT91SAM9X5EK as an example, the board
>> definition file likes:
>>   #define CONFIG_ATMEL_NAND_HW_PMECC    1
>>   #define CONFIG_PMECC_CAP        2
>>   #define CONFIG_PMECC_SECTOR_SIZE    512
>> +
>> +How to enable PMECC header for direct programmable boot.bin
>> +-----------------------------------------------------------
>> +2014-05-15 Andreas Bie?mann <andreas.devel@googlemail.com>
>> +
>> +The usual way to program SPL into NAND flash is to use the SAM-BA
>> Atmel tool.
>> +This however is often not usable when doing field updates. To be able to
>> +program a SPL binary into NAND flash we need to add the PMECC header
>> to the
>> +binary before. Chapter '12.4.4.1 NAND Flash Boot: NAND Flash
>> Detection' in
>> +sama5d3 SoC spec (as of 03. April 2014). We have a new image type
>> added to
>> +mkimage to generate this PMECC header and integrated into the build
>> process of
>> +SPL.
>> +The required parameters in board configuration header are as follows:
>> +
>> +This example is working for sama5d3xek:
>> +
>> +#define CONFIG_SPL_AT91_HEADER_USE_PMECC    1
>> +#define CONFIG_SPL_AT91_HEADER_SECTOR_PER_PAGE    4
>> +#define CONFIG_SPL_AT91_HEADER_SECTOR_SIZE    CONFIG_PMECC_SECTOR_SIZE
>> +#define CONFIG_SPL_AT91_HEADER_SPARE_SIZE    64
>> +#define CONFIG_SPL_AT91_HEADER_ECC_BITS        CONFIG_PMECC_CAP
>> +#define CONFIG_SPL_AT91_HEADER_ECC_OFFSET    36
> 
> Just a nitpick here:
> 
> Can we take this parameter from the existing definition while not use
> new definition? Or else, if the header using different parameter with
> what u-boot nand driver use, then if flash through u-boot, it won't boot.

I used the two parameters I found, sorry the rest isn't defiend anywhere
(or I can't find). Can you give me pointers to the other parameters?

Best regards

Andreas Bie?mann

  reply	other threads:[~2014-05-19  7:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-16  9:59 [U-Boot] [PATCH v2 0/3] Add atmel ROM code image Andreas Bießmann
2014-05-16  9:59 ` [U-Boot] [PATCH v2 1/3] mkimage: add atmelimage Andreas Bießmann
2014-05-16  9:59 ` [U-Boot] [PATCH v2 2/3] arm:at91: enable ROM loadable atmel image Andreas Bießmann
2014-05-19  3:13   ` Bo Shen
2014-05-19  7:48     ` Andreas Bießmann [this message]
2014-05-19  8:09       ` Bo Shen
2014-05-19  8:36         ` Andreas Bießmann
2014-05-16  9:59 ` [U-Boot] [PATCH v2 3/3] sama5d3xek: enable PMECC header generation Andreas Bießmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5379B738.6080800@gmail.com \
    --to=andreas.devel@googlemail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox