From: Pavel Machek <pavel@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCHv1] ARM: Add Altera SOCFPGA Cyclone5
Date: Thu, 30 Aug 2012 20:05:32 +0200 [thread overview]
Message-ID: <20120830180532.GA29900@elf.ucw.cz> (raw)
In-Reply-To: <503FA436.7090201@ti.com>
Hi!
> >>> diff --git a/common/spl/spl.c b/common/spl/spl.c
> >>> index eaea1c8..5adbf0e 100644
> >>> --- a/common/spl/spl.c
> >>> +++ b/common/spl/spl.c
> >>> @@ -78,6 +78,7 @@ void spl_parse_image_header(const struct image_header *header)
> >>> u32 header_size = sizeof(struct image_header);
> >>>
> >>> if (__be32_to_cpu(header->ih_magic) == IH_MAGIC) {
> >>> + /* Valid image. Extract information out of header */
> >>> spl_image.size = __be32_to_cpu(header->ih_size) + header_size;
> >>> spl_image.entry_point = __be32_to_cpu(header->ih_load);
> >>> /* Load including the header */
> >>
> >> Just an extra comment, drop please. Or split out if you feel it's
> >> really helpful. No strong opinion here other than not in the same patch
> >> as the rest.
> >
> > Ok, I'll drop it, and the omap cleanup also. Not worth the merge
> > effort.
> >
> > spl_ram_load_image... will I need to create some kind of #ifdef? Or
> > would #ifdef BOOT_DEVICE_RAM do the trick?
>
> Good point, yes, we should add CONFIG_SPL_RAM_DEVICE and document it in
> docs/README.SPL and the toplevel README.
Ok, something like this? Posting separately, maybe it makes sense to
merge to your PATCH v6...?
[And mental note that HEAP_SIZE needs to be cleaned up in socfpga].
Thanks,
Pavel
commit 644da18450edd725263f3bf4a721654707a700af
Author: Pavel <pavel@ucw.cz>
Date: Thu Aug 30 20:03:42 2012 +0200
Introduce CONFIG_SPL_RAM_DEVICE, as suggested by Tom.
Signed-off-by: Pavel Machek <pavel@denx.de>
diff --git a/README b/README
index ddbeb1b..e782cce 100644
--- a/README
+++ b/README
@@ -2636,6 +2636,9 @@ FIT uImage format:
CONFIG_SPL_SPI_SUPPORT
Support for drivers/spi/libspi.o in SPL binary
+ CONFIG_SPL_RAM_DEVICE
+ Support for running image already present in ram, in SPL binary
+
CONFIG_SPL_LIBGENERIC_SUPPORT
Support for lib/libgeneric.o in SPL binary
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 229fd01..fb96a75 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -115,6 +115,7 @@ static void __noreturn jump_to_image_no_args(void)
image_entry((u32 *)boot_params_ptr_addr);
}
+#ifdef CONFIG_SPL_RAM_DEVICE
static void spl_ram_load_image(void)
{
const struct image_header *header;
@@ -128,6 +129,7 @@ static void spl_ram_load_image(void)
spl_parse_image_header(header);
}
+#endif
void board_init_r(gd_t *dummy1, ulong dummy2)
{
@@ -146,9 +148,11 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
boot_device = spl_boot_device();
debug("boot device - %d\n", boot_device);
switch (boot_device) {
+#ifdef CONFIG_SPL_RAM_DEVICE
case BOOT_DEVICE_RAM:
spl_ram_load_image();
break;
+#endif
#ifdef CONFIG_SPL_MMC_SUPPORT
case BOOT_DEVICE_MMC1:
case BOOT_DEVICE_MMC2:
diff --git a/doc/README.SPL b/doc/README.SPL
index e4a5ac3..2acafba 100644
--- a/doc/README.SPL
+++ b/doc/README.SPL
@@ -66,6 +66,7 @@ CONFIG_SPL_DMA_SUPPORT (drivers/dma/libdma.o)
CONFIG_SPL_POST_MEM_SUPPORT (post/drivers/memory.o)
CONFIG_SPL_NAND_LOAD (drivers/mtd/nand/nand_spl_load.o)
CONFIG_SPL_SPI_LOAD (drivers/mtd/spi/spi_spl_load.o)
+CONFIG_SPL_RAM_DEVICE (common/spl/spl.c)
Normally CPU is assumed to be the same between the SPL and normal
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2012-08-30 18:05 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-16 22:45 [U-Boot] [PATCHv1] ARM: Add Altera SOCFPGA Cyclone5 dinguyen at altera.com
2012-08-22 22:10 ` Pavel Machek
2012-08-22 22:26 ` Marek Vasut
2012-08-23 1:13 ` Tom Rini
2012-08-23 10:43 ` Pavel Machek
2012-08-23 11:18 ` Stefan Roese
2012-08-29 12:30 ` Pavel Machek
2012-08-29 12:32 ` Stefan Roese
2012-08-24 19:18 ` Tom Rini
2012-08-25 9:03 ` Pavel Machek
2012-08-25 10:42 ` Pavel Machek
2012-08-25 11:56 ` Pavel Machek
2012-08-27 15:43 ` Tom Rini
2012-08-29 12:07 ` Pavel Machek
2012-08-25 12:05 ` Pavel Machek
2012-08-27 15:57 ` Tom Rini
2012-08-29 12:27 ` Pavel Machek
2012-08-29 13:41 ` Pavel Machek
2012-08-29 18:26 ` Tom Rini
2012-08-29 23:21 ` Pavel Machek
2012-08-30 0:00 ` Tom Rini
2012-08-30 17:18 ` Pavel Machek
2012-08-30 17:34 ` Tom Rini
2012-08-30 17:46 ` Tom Rini
2012-08-30 18:05 ` Pavel Machek [this message]
2012-08-30 18:30 ` Tom Rini
2012-08-30 20:42 ` Pavel Machek
2012-08-30 22:25 ` Tom Rini
2012-08-31 21:26 ` Dinh Nguyen
2012-08-31 21:37 ` Tom Rini
2012-08-31 7:02 ` Stefan Roese
2012-08-29 23:34 ` Pavel Machek
2012-08-29 23:56 ` Marek Vasut
2012-08-30 16:59 ` Pavel Machek
2012-08-30 18:02 ` Marek Vasut
2012-08-30 18:12 ` Pavel Machek
2012-08-30 18:16 ` Marek Vasut
2012-09-03 2:59 ` Chin Liang See
2012-08-30 0:03 ` Tom Rini
2012-08-30 17:20 ` Pavel Machek
2012-08-23 10:56 ` Pavel Machek
2012-08-23 10:50 ` Pavel Machek
2012-08-24 22:59 ` Tom Rini
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=20120830180532.GA29900@elf.ucw.cz \
--to=pavel@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