From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Thu, 23 Aug 2012 10:10:06 -0700 Subject: [U-Boot] [PATCH 3/6] SPL: Port SPL framework to powerpc In-Reply-To: <1345709565-28862-4-git-send-email-sr@denx.de> References: <1345709565-28862-1-git-send-email-sr@denx.de> <1345709565-28862-4-git-send-email-sr@denx.de> Message-ID: <503663EE.9000902@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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