diff options
author | Simon Glass <sjg@chromium.org> | 2021-07-24 09:03:30 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-08-02 13:32:14 -0400 |
commit | 0b1284eb52578e15ec611adc5fee1a9ae68dadea (patch) | |
tree | 2d83815e93fc16decbaa5671fd660ade0ec74532 /arch/arm/mach-keystone | |
parent | 7e5f460ec457fe310156e399198a41eb0ce1e98c (diff) | |
download | u-boot-0b1284eb52578e15ec611adc5fee1a9ae68dadea.tar.gz |
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 'arch/arm/mach-keystone')
-rw-r--r-- | arch/arm/mach-keystone/cmd_clock.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/mach-keystone/cmd_clock.c b/arch/arm/mach-keystone/cmd_clock.c index 7165d666e5e..72dc394df5f 100644 --- a/arch/arm/mach-keystone/cmd_clock.c +++ b/arch/arm/mach-keystone/cmd_clock.c @@ -42,9 +42,9 @@ int do_pll_cmd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) else goto pll_cmd_usage; - cmd_pll_data.pll_m = simple_strtoul(argv[2], NULL, 10); - cmd_pll_data.pll_d = simple_strtoul(argv[3], NULL, 10); - cmd_pll_data.pll_od = simple_strtoul(argv[4], NULL, 10); + cmd_pll_data.pll_m = dectoul(argv[2], NULL); + cmd_pll_data.pll_d = dectoul(argv[3], NULL); + cmd_pll_data.pll_od = dectoul(argv[4], NULL); printf("Trying to set pll %d; mult %d; div %d; OD %d\n", cmd_pll_data.pll, cmd_pll_data.pll_m, @@ -72,7 +72,7 @@ int do_getclk_cmd(struct cmd_tbl *cmdtp, int flag, int argc, if (argc != 2) goto getclk_cmd_usage; - clk = simple_strtoul(argv[1], NULL, 10); + clk = dectoul(argv[1], NULL); freq = ks_clk_get_rate(clk); if (freq) @@ -101,7 +101,7 @@ int do_psc_cmd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) if (argc != 3) goto psc_cmd_usage; - psc_module = simple_strtoul(argv[1], NULL, 10); + psc_module = dectoul(argv[1], NULL); if (strcmp(argv[2], "en") == 0) { res = psc_enable_module(psc_module); printf("psc_enable_module(%d) - %s\n", psc_module, |