ARM: mach-shmobile: Add zboot support for SuperH Mobile ARM
cover ARM: mach-shmobile: Add zboot support for SuperH Mobile ARM
Hi,
this short patch series by Kuninori Morimoto adds
zboot support to mach-shmobile.
PATCH 1/2 ARM: Add zboot support for SuperH Mobile ARM
An embedded and charset-unspecified text was scrubbed...
Name: arm-mach-shmbobile-Add-zboot-support-for-SuperH-Mobile-ARM-framework.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20101008/ab062c81/attachment.ksh>
PATCH 2/2 ARM: mach-shmobile: Add zboot support for SuperH Mobile ARM
In reply to Simon HormanAn embedded and charset-unspecified text was scrubbed...
Name: arm-mach-shmbobile-Add-zboot-support-for-SuperH-Mobile-ARM-board.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20101008/3aea7557/attachment.ksh>
PATCH 2/2 ARM: mach-shmobile: Add zboot support for SuperH Mobile ARM
Quoted 9 lines · Simon Horman
From: Kuninori Morimoto <[email protected]>
When
COFNIG_ZBOOT_ROMis selected, the resulting zImage file will be small boot loader and may be burned to rom or flash.This is the board-specific portion of this patch-set.
Signed-off-by Kuninori Morimoto <[email protected]>Signed-off-by Simon Horman <[email protected]>
Hey Simon,
Thanks for your work on this!
Quoted 14 lines
(quoted diff) +14
-0+static void __init +fixup_ap4evb(struct machine_desc *desc, struct tag *tag, + ? ? ? ? ? ?char **cmdline, struct meminfo *mi) +{ +#ifdef CONFIG_ZBOOT_ROM + ? ? ? /* + ? ? ? ?* below settings are needed when zboot + ? ? ? ?*/ + ? ? ? tag->hdr.tag ? ? ? ? ? ?= ATAG_CORE; + ? ? ? tag->hdr.size ? ? ? ? ? = tag_size(tag_core); + ? ? ? tag->u.core.flags ? ? ? = 0; + ? ? ? tag->u.core.pagesize ? ?= 0; + ? ? ? tag->u.core.rootdev ? ? = 0; +
Review
Quoted 10 lines
(quoted diff) +10
-0+ ? ? ? tag ? ? ? ? ? ? ? ? ? ? = tag_next(tag); + ? ? ? tag->hdr.tag ? ? ? ? ? ?= ATAG_MEM; + ? ? ? tag->hdr.size ? ? ? ? ? = tag_size(tag_mem32); + ? ? ? tag->u.mem.size ? ? ? ? = CONFIG_MEMORY_SIZE; + ? ? ? tag->u.mem.start ? ? ? ?= CONFIG_MEMORY_START; + + ? ? ? tag ? ? ? ? ? ? ? ? ? ? = tag_next(tag); + ? ? ? tag->hdr.tag ? ? ? ? ? ?= ATAG_NONE; + ? ? ? tag->hdr.size ? ? ? ? ? = 0; +#endif
Hm, I wonder if this part can be rearranged. Perhaps I'm misunderstanding, but I would really really prefer if the memory information could be passed from the romImage header instead of adding fixups in the board specific code. This code looks like a workaround for not passing information properly. We probably want to pass other parameters anyway, so it shouldn't be any big issue.
Cheers,
/ magnus
PATCH 2/2 ARM: mach-shmobile: Add zboot support for SuperH Mobile ARM
Quoted 38 lines · Magnus Damm
Quoted 9 lines · Simon Horman
From: Kuninori Morimoto <[email protected]>
When
COFNIG_ZBOOT_ROMis selected, the resulting zImage file will be small boot loader and may be burned to rom or flash.This is the board-specific portion of this patch-set.
Signed-off-by Kuninori Morimoto <[email protected]>Signed-off-by Simon Horman <[email protected]>Hey Simon,
Thanks for your work on this!
Quoted 23 lines
(quoted diff) +23
-0+static void __init +fixup_ap4evb(struct machine_desc *desc, struct tag *tag, + ? ? ? ? ? ?char **cmdline, struct meminfo *mi) +{ +#ifdef CONFIG_ZBOOT_ROM + ? ? ? /* + ? ? ? ?* below settings are needed when zboot + ? ? ? ?*/ + ? ? ? tag->hdr.tag ? ? ? ? ? ?= ATAG_CORE; + ? ? ? tag->hdr.size ? ? ? ? ? = tag_size(tag_core); + ? ? ? tag->u.core.flags ? ? ? = 0; + ? ? ? tag->u.core.pagesize ? ?= 0; + ? ? ? tag->u.core.rootdev ? ? = 0; + + ? ? ? tag ? ? ? ? ? ? ? ? ? ? = tag_next(tag); + ? ? ? tag->hdr.tag ? ? ? ? ? ?= ATAG_MEM; + ? ? ? tag->hdr.size ? ? ? ? ? = tag_size(tag_mem32); + ? ? ? tag->u.mem.size ? ? ? ? = CONFIG_MEMORY_SIZE; + ? ? ? tag->u.mem.start ? ? ? ?= CONFIG_MEMORY_START; + + ? ? ? tag ? ? ? ? ? ? ? ? ? ? = tag_next(tag); + ? ? ? tag->hdr.tag ? ? ? ? ? ?= ATAG_NONE; + ? ? ? tag->hdr.size ? ? ? ? ? = 0;
Quoted 8 lines
Quoted 1 line
+#endif
Hm, I wonder if this part can be rearranged. Perhaps I'm misunderstanding, but I would really really prefer if the memory information could be passed from the romImage header instead of adding fixups in the board specific code. This code looks like a workaround for not passing information properly. We probably want to pass other parameters anyway, so it shouldn't be any big issue.
Hi Magnus,
thanks for the suggestion. I will look into it and get back to you.