From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH 3/8] arm, davinci: Add SPL support for DA850 SoCs
Date: Wed, 16 Nov 2011 08:35:25 +0100 [thread overview]
Message-ID: <4EC367BD.7040306@denx.de> (raw)
In-Reply-To: <CABkLOboMFrQ_isxjfz2AgOZv7rKHpA9Af+N_gQYJ-0UKH+09FA@mail.gmail.com>
Hello Christian,
Christian Riesch wrote:
> Hello Heiko,
> thanks for your comments!
>
> On Wed, Nov 16, 2011 at 7:35 AM, Heiko Schocher <hs@denx.de> wrote:
>> Christian Riesch wrote:
>>> Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
>>> Cc: Heiko Schocher <hs@denx.de>
>>> Cc: Sandeep Paulraj <s-paulraj@ti.com>
>>> ---
>>> arch/arm/cpu/arm926ejs/davinci/Makefile | 3 ++-
>>> arch/arm/cpu/arm926ejs/davinci/spl.c | 11 ++++++++++-
>>> 2 files changed, 12 insertions(+), 2 deletions(-)
>>>
> [...]
>>> diff --git a/arch/arm/cpu/arm926ejs/davinci/spl.c b/arch/arm/cpu/arm926ejs/davinci/spl.c
>>> index d9b9398..bb4ee13 100644
>>> --- a/arch/arm/cpu/arm926ejs/davinci/spl.c
>>> +++ b/arch/arm/cpu/arm926ejs/davinci/spl.c
> [...]
>>> void board_init_r(gd_t *id, ulong dummy)
>>> {
>>> -
>>> +#ifdef CONFIG_SOC_DM365
>>> nand_init();
>>> puts("Nand boot...\n");
>>> nand_boot();
>>> +#endif
>>> +#ifdef CONFIG_SOC_DA8XX
>>> + hang();
>>> +#endif
>> Maybe a comment why you call hang() here (I think because SPL code
>> is not yet tried out on da8xx) would help here.
>
> The code is tested on da8xx (the AM1808 I tested it on is part of the
> da8xx family) but as I didn't yet look into loading an u-boot image
> from SPI flash (which I should do here for the da850evm) I just call
> hang() here. I commented on this in the cover message:
>
> ---snip---
> This patchset is not a complete implementation, it is missing the
> code that is actually used to load u-boot from SPI flash to the
> DDR memory. The code just hangs after the initialization is done. But
> I submit it nevertheless as RFC and I am looking forward to your comments.
> ---snip---
Ups .. sorry ... missed it. Hmm... have you no u-boot image on this
board (for example in nand)? Then you could load as an example this
code ...
Hmm.. as it is a RFC ... maybe we should go the following way:
(just a fast idea):
create new file u-boot:spl/boot.c:
/* could be board specific */
static int __weak get_boot_method(void)
{
#if defined SPL_BOOTMETHOD_NAND
return SPL_BOOTMETHOD_NAND
#endif
#if defined SPL_BOOTMETHOD_SPI
return SPL_BOOTMETHOD_SPI
#endif
[...]
/*
* if more options are defined for one board
* board specific code has to be written, to decide
* which boot method is used (gpio pin?)
* So it is possible to boot from different
* devices...
*/
}
void board_init_r(gd_t *id, ulong dummy)
{
int boot_method;
boot_method = get_boot_method();
switch (boot_ethod) {
#if defined SPL_BOOTMETHOD_NAND
case SPL_BOOTMETHOD_NAND:
nand_init();
puts("Nand boot...\n");
nand_boot();
break;
#endif
#if defined SPL_BOOTMETHOD_SPI
case SPL_BOOTMETHOD_NAND:
puts("SPI boot...\n");
break;
#endif
default:
/* error */
puts("no valid boot method\n");
hang();
break;
}
}
That should be usable from other architectures too ...
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
next prev parent reply other threads:[~2011-11-16 7:35 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-15 10:37 [U-Boot] [RFC PATCH 0/8] da850evm: Add SPL support for booting from SPI flash Christian Riesch
2011-11-15 10:37 ` [U-Boot] [RFC PATCH 1/8] arm, davinci: Move pinmux functions from board to arch tree Christian Riesch
2011-11-16 6:38 ` Heiko Schocher
2011-11-15 10:37 ` [U-Boot] [RFC PATCH 2/8] arm, davinci: Fix clear_bss for zero length bss Christian Riesch
2011-11-15 10:37 ` [U-Boot] [RFC PATCH 3/8] arm, davinci: Add SPL support for DA850 SoCs Christian Riesch
2011-11-16 6:35 ` Heiko Schocher
2011-11-16 7:13 ` Christian Riesch
2011-11-16 7:35 ` Heiko Schocher [this message]
2011-11-15 10:37 ` [U-Boot] [RFC PATCH 4/8] arm: printf() is not available in the SPL Christian Riesch
2011-11-15 17:50 ` Tom Rini
2011-11-16 7:37 ` Christian Riesch
2011-11-16 14:18 ` Tom Rini
2011-11-15 10:37 ` [U-Boot] [RFC PATCH 5/8] arm, davinci: Replace pinmuxing in da850_lowlevel.c Christian Riesch
2011-11-16 6:49 ` Heiko Schocher
2011-11-18 8:22 ` Christian Riesch
2011-11-18 8:24 ` Christian Riesch
2011-11-18 8:35 ` Christian Riesch
2011-11-18 10:09 ` Heiko Schocher
2011-11-15 10:37 ` [U-Boot] [RFC PATCH 6/8] da850evm: Add a basic SPL for SPI boot Christian Riesch
2011-11-15 10:37 ` [U-Boot] [RFC PATCH 7/8] mkimage: Fix variable length header support Christian Riesch
2011-11-15 10:37 ` [U-Boot] [RFC PATCH 8/8] arm, davinci: Add support for generating AIS images to the Makefile Christian Riesch
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=4EC367BD.7040306@denx.de \
--to=hs@denx.de \
--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