summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2016-03-30 23:51:04 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2016-03-30 23:53:04 +0200
commite1a48b27907ae3f4592de43d42939a654aed9533 (patch)
tree749ade5379a60eba24497917bf12ef5fa4044f14
parent119db1915caf1bfa42ae9e6d331d693c8585a5f4 (diff)
Adding command availability check for update fusing command useful for update scripts. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
-rw-r--r--board/toradex/apalis_imx6/do_fuse.c6
-rw-r--r--board/toradex/colibri_imx6/do_fuse.c6
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 57e0b07713a..6447e3133f4 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 57e0b07713a..6447e3133f4 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"
);