summaryrefslogtreecommitdiff
path: root/arch/nios2
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2013-06-11 11:14:46 -0700
committerTom Rini <trini@ti.com>2013-06-26 10:16:41 -0400
commit983c72f479173bced296f7292b4a9fbef9d17688 (patch)
treea484e1ec6bc6d48ce0957c87df79357f319e618d /arch/nios2
parent37544a6dabdaf474726ed8374c58598f61e3fd71 (diff)
downloadu-boot-imx-983c72f479173bced296f7292b4a9fbef9d17688.zip
u-boot-imx-983c72f479173bced296f7292b4a9fbef9d17688.tar.gz
u-boot-imx-983c72f479173bced296f7292b4a9fbef9d17688.tar.bz2
Clarify bootm OS arguments
At present the arguments to bootm are processed in a somewhat confusing way. Sub-functions must know how many arguments their calling functions have processed, and the OS boot function must also have this information. Also it isn't obvious that 'bootm' and 'bootm start' provide arguments in the same way. Adjust the code so that arguments are removed from the list before calling a sub-function. This means that all functions can know that argv[0] is the first argument of which they need to take notice. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/nios2')
-rw-r--r--arch/nios2/lib/bootm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/nios2/lib/bootm.c b/arch/nios2/lib/bootm.c
index f32be52..114e146 100644
--- a/arch/nios2/lib/bootm.c
+++ b/arch/nios2/lib/bootm.c
@@ -40,8 +40,8 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima
if (images->ft_len)
of_flat_tree = images->ft_addr;
#endif
- if (!of_flat_tree && argc > 3)
- of_flat_tree = (char *)simple_strtoul(argv[3], NULL, 16);
+ if (!of_flat_tree && argc > 1)
+ of_flat_tree = (char *)simple_strtoul(argv[1], NULL, 16);
if (of_flat_tree)
initrd_end = (ulong)of_flat_tree;