diff options
author | Simon Glass <sjg@chromium.org> | 2013-07-04 13:26:10 -0700 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-07-10 09:15:14 -0400 |
commit | a5266d6b5d3d94bbbf7fed572a96aa0e90ff4199 (patch) | |
tree | 9e3081db245b9dbf6704048982131ce807e9253b /arch/arm | |
parent | a26913f32df0d26b94f6c5518d744df5ba6ededb (diff) | |
download | u-boot-a5266d6b5d3d94bbbf7fed572a96aa0e90ff4199.tar.gz u-boot-a5266d6b5d3d94bbbf7fed572a96aa0e90ff4199.tar.xz u-boot-a5266d6b5d3d94bbbf7fed572a96aa0e90ff4199.zip |
bootm: Clean up bootz_setup() function
This function has no prototype in the headers and passes void * around, thus
requiring several casts. Tidy this up.
- Add new patch to clean up bootz_setup() function
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/lib/bootm.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index b22fbc9982..0325d08ca9 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -300,21 +300,23 @@ struct zimage_header { #define LINUX_ARM_ZIMAGE_MAGIC 0x016f2818 -int bootz_setup(void *image, void **start, void **end) +int bootz_setup(ulong image, ulong *start, ulong *end) { - struct zimage_header *zi = (struct zimage_header *)image; + struct zimage_header *zi; + zi = (struct zimage_header *)map_sysmem(image, 0); if (zi->zi_magic != LINUX_ARM_ZIMAGE_MAGIC) { puts("Bad Linux ARM zImage magic!\n"); return 1; } - *start = (void *)zi->zi_start; - *end = (void *)zi->zi_end; + *start = zi->zi_start; + *end = zi->zi_end; - debug("Kernel image @ 0x%08x [ 0x%08x - 0x%08x ]\n", - (uint32_t)image, (uint32_t)*start, (uint32_t)*end); + printf("Kernel image @ %#08lx [ %#08lx - %#08lx ]\n", image, *start, + *end); return 0; } + #endif /* CONFIG_CMD_BOOTZ */ |