[U-Boot] [PATCH 3/6] SPL: Port SPL framework to powerpc

Tom Rini
2012-08-23T17:10:06Z

On 08/23/2012 01:12 AM, Stefan Roese wrote:

> This patch enables the SPL framework to be used on powerpc platforms
> and not only ARM.
[snip]
> +#ifdef CONFIG_ARM
> /* Define global data structure pointer to it*/
> gd_t gdata __attribute__ ((section(".data")));
> +#endif

So you handle cleaning up the BSS differently, interesting. I'm going
to see if that would work for ARM too..

[snip]
> @@ -89,7 +106,11 @@ void spl_parse_image_header(const struct image_header *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 */
> +#ifdef CONFIG_ARM
> spl_image.load_addr = spl_image.entry_point - header_size;
> +#else
> + spl_image.load_addr = __be32_to_cpu(header->ih_load);
> +#endif

This isn't an ARM-ism but is instead because spl_nor.c isn't offsetting
where the header is like mmc/nand/ymodem do, yes? Would it be possible
to make spl_nor.c behave like the others? One of the reasons I ask is
I'm looking at a NOR chip on my desk...

--
Tom