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>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/soc.c b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
index 0562d28..1641b65 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/soc.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
@@ -277,7 +277,7 @@
 	ulong interval_mhz = get_bus_freq(0) / (1000 * 1000);
 
 	if (interval)
-		interval_mhz = simple_strtoul(interval, NULL, 10);
+		interval_mhz = dectoul(interval, NULL);
 
 	return interval_mhz;
 }
diff --git a/arch/arm/mach-imx/cmd_dek.c b/arch/arm/mach-imx/cmd_dek.c
index 40df10d..1e3cfee 100644
--- a/arch/arm/mach-imx/cmd_dek.c
+++ b/arch/arm/mach-imx/cmd_dek.c
@@ -302,7 +302,7 @@
 
 	src_addr = hextoul(argv[1], NULL);
 	dst_addr = hextoul(argv[2], NULL);
-	len = simple_strtoul(argv[3], NULL, 10);
+	len = dectoul(argv[3], NULL);
 
 	return blob_encap_dek(src_addr, dst_addr, len);
 }
diff --git a/arch/arm/mach-imx/cmd_mfgprot.c b/arch/arm/mach-imx/cmd_mfgprot.c
index 29074fc..1e866b7 100644
--- a/arch/arm/mach-imx/cmd_mfgprot.c
+++ b/arch/arm/mach-imx/cmd_mfgprot.c
@@ -72,7 +72,7 @@
 			return CMD_RET_USAGE;
 
 		m_addr = hextoul(argv[2], NULL);
-		m_size = simple_strtoul(argv[3], NULL, 10);
+		m_size = dectoul(argv[3], NULL);
 		m_ptr = map_physmem(m_addr, m_size, MAP_NOCACHE);
 		if (!m_ptr)
 			return -ENOMEM;
diff --git a/arch/arm/mach-imx/imx8/snvs_security_sc.c b/arch/arm/mach-imx/imx8/snvs_security_sc.c
index 7c34ce6..507b5b4 100644
--- a/arch/arm/mach-imx/imx8/snvs_security_sc.c
+++ b/arch/arm/mach-imx/imx8/snvs_security_sc.c
@@ -726,7 +726,7 @@
 	if (argc != (2 + 1))
 		return CMD_RET_USAGE;
 
-	conf.pad = simple_strtoul(argv[++idx], NULL, 10);
+	conf.pad = dectoul(argv[++idx], NULL);
 	conf.mux_conf = hextoul(argv[++idx], NULL);
 
 	err = apply_tamper_pin_list_config(&conf, 1);
diff --git a/arch/arm/mach-keystone/cmd_clock.c b/arch/arm/mach-keystone/cmd_clock.c
index 7165d66..72dc394 100644
--- a/arch/arm/mach-keystone/cmd_clock.c
+++ b/arch/arm/mach-keystone/cmd_clock.c
@@ -42,9 +42,9 @@
 	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 @@
 	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 @@
 	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,
diff --git a/arch/arm/mach-kirkwood/cpu.c b/arch/arm/mach-kirkwood/cpu.c
index 339ae7f..3953aa9 100644
--- a/arch/arm/mach-kirkwood/cpu.c
+++ b/arch/arm/mach-kirkwood/cpu.c
@@ -125,7 +125,7 @@
 		return;
 
 	/* read sysrstdelay value */
-	sysrst_dly = (u32) simple_strtoul(s, NULL, 10);
+	sysrst_dly = (u32)dectoul(s, NULL);
 
 	/* read SysRst Length counter register (bits 28:0) */
 	sysrst_cnt = (0x1fffffff & readl(KW_REG_SYSRST_CNT));
diff --git a/arch/arm/mach-nexell/clock.c b/arch/arm/mach-nexell/clock.c
index d5b46a8..24fa204 100644
--- a/arch/arm/mach-nexell/clock.c
+++ b/arch/arm/mach-nexell/clock.c
@@ -592,7 +592,7 @@
 			c = strrchr((const char *)str, (int)'.');
 			if (!c || !cdev->peri)
 				break;
-		devid = simple_strtoul(++c, NULL, 10);
+		devid = dectoul(++c, NULL);
 		if (cdev->peri->dev_id == devid)
 			break;
 		}
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c b/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c
index bf9a686..be53a52 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c
@@ -59,7 +59,7 @@
 		return CMD_RET_USAGE;
 	}
 
-	dev = (int)simple_strtoul(argv[2], NULL, 10);
+	dev = (int)dectoul(argv[2], NULL);
 
 	addr = STM32_DDR_BASE;
 	size = 0;
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
index 96ebc6d..26fe8b6 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
@@ -253,7 +253,7 @@
 				result = -EINVAL;
 			else
 				part->bin_nb =
-					simple_strtoul(&p[7], NULL, 10);
+					dectoul(&p[7], NULL);
 		}
 	} else if (!strcmp(p, "System")) {
 		part->part_type = PART_SYSTEM;
diff --git a/arch/powerpc/cpu/mpc83xx/ecc.c b/arch/powerpc/cpu/mpc83xx/ecc.c
index 68a7a78..7a8ec7f 100644
--- a/arch/powerpc/cpu/mpc83xx/ecc.c
+++ b/arch/powerpc/cpu/mpc83xx/ecc.c
@@ -138,7 +138,7 @@
 	}
 	if (argc == 3) {
 		if (strcmp(argv[1], "sbecnt") == 0) {
-			val = simple_strtoul(argv[2], NULL, 10);
+			val = dectoul(argv[2], NULL);
 			if (val > 255) {
 				printf("Incorrect Counter value, "
 				       "should be 0..255\n");
@@ -151,7 +151,7 @@
 			ddr->err_sbe = val;
 			return 0;
 		} else if (strcmp(argv[1], "sbethr") == 0) {
-			val = simple_strtoul(argv[2], NULL, 10);
+			val = dectoul(argv[2], NULL);
 			if (val > 255) {
 				printf("Incorrect Counter value, "
 				       "should be 0..255\n");