[U-Boot] [PATCH 4/5] ARM: OMAP: Cleanup boot parameters usage
Sricharan R
r.sricharan at ti.com
Mon Apr 15 17:39:30 CEST 2013
On Monday 15 April 2013 09:05 PM, Tom Rini wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 04/15/2013 11:08 AM, Sricharan R wrote:
>> The boot parameters are read from individual variables assigned
>> for each of them. This been corrected and now they are stored as a
>> part of the global data 'gd' structure. So read them from 'gd'
>> instead.
>>
>> Signed-off-by: Sricharan R <r.sricharan at ti.com> ---
>> arch/arm/cpu/armv7/lowlevel_init.S | 8 ++++-
>> arch/arm/cpu/armv7/omap-common/boot-common.c | 20 ++---------
>> arch/arm/cpu/armv7/omap-common/lowlevel_init.S | 46
>> ++----------------------
>> arch/arm/include/asm/arch-omap4/sys_proto.h | 11 ++----
>> arch/arm/include/asm/arch-omap5/sys_proto.h | 12 ++-----
>> arch/arm/include/asm/omap_common.h | 3 ++
>> common/spl/spl.c | 12 ++++---
>> include/configs/am335x_evm.h | 1 +
>> include/configs/pcm051.h | 1 +
>> include/configs/ti814x_evm.h | 1 +
>> include/spl.h | 1 - 11 files
>> changed, 32 insertions(+), 84 deletions(-)
>
> I can live with adding CONFIG_OMAP to the am335/ti81* parts.
Thanks. I was suspicious about this.
BTW, does am335/ti81 devices get the bootparams from romcode
in the same as OMAP ?
Also are there any am335 boards with XIP where i can test this ?
>
> [snip]
>> diff --git a/common/spl/spl.c b/common/spl/spl.c index
>> 6715e0d..4a7ce42 100644 --- a/common/spl/spl.c +++
>> b/common/spl/spl.c @@ -125,17 +125,21 @@ void
>> spl_parse_image_header(const struct image_header *header)
>>
>> __weak void __noreturn jump_to_image_no_args(struct spl_image_info
>> *spl_image) { +#ifdef CONFIG_OMAP typedef void __noreturn
>> (*image_entry_noargs_t)(u32 *); +#else + typedef void __noreturn
>> (*image_entry_noargs_t)(void); +#endif image_entry_noargs_t
>> image_entry = (image_entry_noargs_t) spl_image->entry_point;
>>
>> debug("image entry point: 0x%X\n", spl_image->entry_point); /*
>> Pass the saved boot_params from rom code */ -#if
>> defined(CONFIG_VIRTIO) || defined(CONFIG_ZEBU) - image_entry =
>> (image_entry_noargs_t)0x80100000; +#ifdef CONFIG_OMAP +
>> image_entry((u32 *)&gd->arch.omap_boot_params); +#else +
>> image_entry(); #endif - u32 boot_params_ptr_addr =
>> (u32)&boot_params_ptr; - image_entry((u32 *)boot_params_ptr_addr);
>> }
>
> We must correct jump_to_image_no_args to really be, in the default
> case here just image_entry() and have omap-common override the weak
> function with one that passes along our params, and comment what's
> going on.
>
ok, that looks cleaner. This change in V2.
Regards,
Sricharan
More information about the U-Boot
mailing list