From e1a48b27907ae3f4592de43d42939a654aed9533 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Wed, 30 Mar 2016 23:51:04 +0200 Subject: apalis/colibri_imx6: availability check for update fusing command Adding command availability check for update fusing command useful for update scripts. Signed-off-by: Marcel Ziswiler --- board/toradex/apalis_imx6/do_fuse.c | 6 +++++- board/toradex/colibri_imx6/do_fuse.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/board/toradex/apalis_imx6/do_fuse.c b/board/toradex/apalis_imx6/do_fuse.c index 57e0b07713..6447e3133f 100644 --- a/board/toradex/apalis_imx6/do_fuse.c +++ b/board/toradex/apalis_imx6/do_fuse.c @@ -55,6 +55,10 @@ int do_updt_fuse(cmd_tbl_t *cmdtp, int flag, int argc, int ret; int confirmed = argc >= 1 && !strcmp(argv[1], "-y"); + /* can be used in scripts for command availability check */ + if (argc >= 1 && !strcmp(argv[1], "-n")) + return CMD_RET_SUCCESS; + /* boot cfg */ fuse_sense(0, 5, &val); printf("Fuse 0, 5: %8x\n", val); @@ -89,5 +93,5 @@ U_BOOT_CMD( U_BOOT_CMD( updt_fuse, 2, 0, do_updt_fuse, "OTP fusing during module update", - "updt_fuse [-y] - boot cfg fast boot mode fusing" + "updt_fuse [-n] [-y] - boot cfg fast boot mode fusing" ); diff --git a/board/toradex/colibri_imx6/do_fuse.c b/board/toradex/colibri_imx6/do_fuse.c index 57e0b07713..6447e3133f 100644 --- a/board/toradex/colibri_imx6/do_fuse.c +++ b/board/toradex/colibri_imx6/do_fuse.c @@ -55,6 +55,10 @@ int do_updt_fuse(cmd_tbl_t *cmdtp, int flag, int argc, int ret; int confirmed = argc >= 1 && !strcmp(argv[1], "-y"); + /* can be used in scripts for command availability check */ + if (argc >= 1 && !strcmp(argv[1], "-n")) + return CMD_RET_SUCCESS; + /* boot cfg */ fuse_sense(0, 5, &val); printf("Fuse 0, 5: %8x\n", val); @@ -89,5 +93,5 @@ U_BOOT_CMD( U_BOOT_CMD( updt_fuse, 2, 0, do_updt_fuse, "OTP fusing during module update", - "updt_fuse [-y] - boot cfg fast boot mode fusing" + "updt_fuse [-n] [-y] - boot cfg fast boot mode fusing" ); -- cgit v1.2.3