Hello Christian, Christian Riesch wrote: > Hello Heiko, > thanks for your comments! > > On Wed, Nov 16, 2011 at 7:35 AM, Heiko Schocher <h...@denx.de> wrote: >> Christian Riesch wrote: >>> Signed-off-by: Christian Riesch <christian.rie...@omicron.at> >>> Cc: Heiko Schocher <h...@denx.de> >>> Cc: Sandeep Paulraj <s-paul...@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 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot