From 0eb8686dc2cb332c4839ef1f56f29b1607b5954a Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Tue, 21 Sep 2010 15:42:47 +0200 Subject: arm: allow to overwrite the system_rev via bootm Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD Tested-by: Nicolas Ferre Signed-off-by: Sascha Hauer --- arch/arm/lib/armlinux.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/arch/arm/lib/armlinux.c b/arch/arm/lib/armlinux.c index 040fd346bf..b50d535811 100644 --- a/arch/arm/lib/armlinux.c +++ b/arch/arm/lib/armlinux.c @@ -249,19 +249,29 @@ int do_bootm_linux(struct image_data *data) static int image_handle_cmdline_parse(struct image_data *data, int opt, char *optarg) { + int ret = 1; + switch (opt) { case 'a': armlinux_architecture = simple_strtoul(optarg, NULL, 0); - return 0; + ret = 0; + break; + case 'R': + system_rev = simple_strtoul(optarg, NULL, 0); + ret = 0; + break; default: - return 1; + break; } + + return ret; } static struct image_handler handler = { - .cmdline_options = "a:", + .cmdline_options = "a:R:", .cmdline_parse = image_handle_cmdline_parse, - .help_string = " -a use architecture number ", + .help_string = " -a use architecture number \n" + " -R use system revison \n", .bootm = do_bootm_linux, .image_type = IH_OS_LINUX, -- cgit v1.2.3