summaryrefslogtreecommitdiff
path: root/cmd/axi.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-07-24 09:03:30 -0600
committerTom Rini <trini@konsulko.com>2021-08-02 13:32:14 -0400
commit0b1284eb52578e15ec611adc5fee1a9ae68dadea (patch)
tree2d83815e93fc16decbaa5671fd660ade0ec74532 /cmd/axi.c
parent7e5f460ec457fe310156e399198a41eb0ce1e98c (diff)
global: Convert simple_strtoul() with decimal to dectoul()
It is a pain to have to specify the value 10 in each call. Add a new dectoul() function and update the code to use it. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'cmd/axi.c')
-rw-r--r--cmd/axi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/axi.c b/cmd/axi.c
index c676819b81..0c80fef053 100644
--- a/cmd/axi.c
+++ b/cmd/axi.c
@@ -120,7 +120,7 @@ static int do_axi_show_bus(struct cmd_tbl *cmdtp, int flag, int argc,
int i;
/* show specific bus */
- i = simple_strtoul(argv[1], NULL, 10);
+ i = dectoul(argv[1], NULL);
struct udevice *bus;
int ret;
@@ -153,7 +153,7 @@ static int do_axi_bus_num(struct cmd_tbl *cmdtp, int flag, int argc,
printf("Current bus is %d\n", bus_no);
} else {
- bus_no = simple_strtoul(argv[1], NULL, 10);
+ bus_no = dectoul(argv[1], NULL);
printf("Setting bus to %d\n", bus_no);
ret = axi_set_cur_bus(bus_no);
@@ -193,7 +193,7 @@ static int do_axi_md(struct cmd_tbl *cmdtp, int flag, int argc,
}
if ((flag & CMD_FLAG_REPEAT) == 0) {
- size = simple_strtoul(argv[1], NULL, 10);
+ size = dectoul(argv[1], NULL);
/*
* Address is specified since argc >= 3
@@ -273,7 +273,7 @@ static int do_axi_mw(struct cmd_tbl *cmdtp, int flag, int argc,
if (argc <= 3 || argc >= 6)
return CMD_RET_USAGE;
- size = simple_strtoul(argv[1], NULL, 10);
+ size = dectoul(argv[1], NULL);
switch (size) {
case 8: