From: "Andreas Bießmann" <andreas.devel@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] arm: atmel: sama5d3: add spi spl boot support
Date: Mon, 09 Dec 2013 11:28:30 +0100 [thread overview]
Message-ID: <52A59B4E.10409@gmail.com> (raw)
In-Reply-To: <1385954663-7682-2-git-send-email-voice.shen@atmel.com>
Hi Bo,
On 12/02/2013 04:24 AM, Bo Shen wrote:
> Add SPI SPL boot support for sama5d3xek board.
>
> Signed-off-by: Bo Shen <voice.shen@atmel.com>
> ---
> arch/arm/cpu/at91-common/spl.c | 2 ++
> arch/arm/include/asm/arch-at91/spl.h | 2 ++
> board/atmel/sama5d3xek/sama5d3xek.c | 2 ++
> include/configs/sama5d3xek.h | 11 +++++++++++
> 4 files changed, 17 insertions(+)
>
> diff --git a/arch/arm/cpu/at91-common/spl.c b/arch/arm/cpu/at91-common/spl.c
> index 37c0cc4..2598e09 100644
> --- a/arch/arm/cpu/at91-common/spl.c
> +++ b/arch/arm/cpu/at91-common/spl.c
> @@ -52,6 +52,8 @@ u32 spl_boot_device(void)
> {
> #ifdef CONFIG_SYS_USE_MMC
> return BOOT_DEVICE_MMC1;
> +#elif CONFIG_SYS_USE_SERIALFLASH
> + return BOOT_DEVICE_SPI;
> #endif
> return BOOT_DEVICE_NONE;
> }
I'm not really happy with this solution. We will get a ifdef-nightmare
here for each specific SPL implementation.
Could you please check with your ROM developers if there is some way to
get the boot source? I know Ti guys have implemented some function
parameter to tell that to the next running code in ROM. I can't believe
Atmel has nothing comparable.
The last resort could be to add some proprietary parameter to the SPL
that we could read then and return the correct value in
spl_boot_device() depending on that that stored value ... quite ugly but
I think it is better than clutter this place with a lot of ifdef's.
Another solution could be to move this function to board code.
Any other suggestions?
Best regards
Andreas Bie?mann
next prev parent reply other threads:[~2013-12-09 10:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-02 3:24 [U-Boot] [PATCH 0/3] arm: atmel: sama5d3: add spi and nand spl boot support Bo Shen
2013-12-02 3:24 ` [U-Boot] [PATCH 1/3] arm: atmel: sama5d3: add spi " Bo Shen
2013-12-09 10:28 ` Andreas Bießmann [this message]
2013-12-10 1:51 ` Bo Shen
2013-12-02 3:24 ` [U-Boot] [PATCH 2/3] mtd: nand: atmel: prepare for nand " Bo Shen
2014-02-28 0:35 ` Scott Wood
2014-03-03 2:41 ` Bo Shen
2014-03-03 5:07 ` Bo Shen
2013-12-02 3:24 ` [U-Boot] [PATCH 3/3] arm: atmel: sama5d3: add " Bo Shen
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=52A59B4E.10409@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