global: Convert simple_strtoul() with hex to hextoul()

It is a pain to have to specify the value 16 in each call. Add a new
hextoul() function and update the code to use it.

Add a proper comment to simple_strtoul() while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
index f1624ff..6eb7f9c 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
@@ -565,28 +565,28 @@
 	if (!p)
 		return;
 
-	pclassfw = (void *)simple_strtoul(p, NULL, 16);
+	pclassfw = (void *)hextoul(p, NULL);
 	if (!pclassfw)
 		return;
 
 	p = env_get("class_elf_size");
 	if (!p)
 		return;
-	len_class = simple_strtoul(p, NULL, 16);
+	len_class = hextoul(p, NULL);
 
 	/* If the environment variable is not set, then exit silently */
 	p = env_get("tmu_elf_firmware");
 	if (!p)
 		return;
 
-	ptmufw = (void *)simple_strtoul(p, NULL, 16);
+	ptmufw = (void *)hextoul(p, NULL);
 	if (!ptmufw)
 		return;
 
 	p = env_get("tmu_elf_size");
 	if (!p)
 		return;
-	len_tmu = simple_strtoul(p, NULL, 16);
+	len_tmu = hextoul(p, NULL);
 
 	if (len_class == 0 || len_tmu == 0) {
 		printf("PFE FW corrupted. CLASS FW size %d, TMU FW size %d\n",
@@ -605,14 +605,14 @@
 	if (!p)
 		return;
 
-	putilfw = (void *)simple_strtoul(p, NULL, 16);
+	putilfw = (void *)hextoul(p, NULL);
 	if (!putilfw)
 		return;
 
 	p = env_get("util_elf_size");
 	if (!p)
 		return;
-	len_util = simple_strtoul(p, NULL, 16);
+	len_util = hextoul(p, NULL);
 
 	if (len_util) {
 		printf("PFE Util PE firmware is not added to FDT.\n");
diff --git a/arch/arm/lib/semihosting.c b/arch/arm/lib/semihosting.c
index 904fddd..9fd8245 100644
--- a/arch/arm/lib/semihosting.c
+++ b/arch/arm/lib/semihosting.c
@@ -191,7 +191,7 @@
 		int ret;
 		char end_str[64];
 
-		load_addr = simple_strtoul(argv[2], NULL, 16);
+		load_addr = hextoul(argv[2], NULL);
 		if (!load_addr)
 			return -1;
 
diff --git a/arch/arm/mach-imx/cmd_dek.c b/arch/arm/mach-imx/cmd_dek.c
index b10ead1..40df10d 100644
--- a/arch/arm/mach-imx/cmd_dek.c
+++ b/arch/arm/mach-imx/cmd_dek.c
@@ -300,8 +300,8 @@
 	if (argc != 4)
 		return CMD_RET_USAGE;
 
-	src_addr = simple_strtoul(argv[1], NULL, 16);
-	dst_addr = simple_strtoul(argv[2], NULL, 16);
+	src_addr = hextoul(argv[1], NULL);
+	dst_addr = hextoul(argv[2], NULL);
 	len = simple_strtoul(argv[3], NULL, 10);
 
 	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 1430f61..29074fc 100644
--- a/arch/arm/mach-imx/cmd_mfgprot.c
+++ b/arch/arm/mach-imx/cmd_mfgprot.c
@@ -71,7 +71,7 @@
 		if (argc != 4)
 			return CMD_RET_USAGE;
 
-		m_addr = simple_strtoul(argv[2], NULL, 16);
+		m_addr = hextoul(argv[2], NULL);
 		m_size = simple_strtoul(argv[3], NULL, 10);
 		m_ptr = map_physmem(m_addr, m_size, MAP_NOCACHE);
 		if (!m_ptr)
diff --git a/arch/arm/mach-imx/cmd_nandbcb.c b/arch/arm/mach-imx/cmd_nandbcb.c
index 7157c9e..cd51344 100644
--- a/arch/arm/mach-imx/cmd_nandbcb.c
+++ b/arch/arm/mach-imx/cmd_nandbcb.c
@@ -1083,13 +1083,13 @@
 
 	mtd = cfg.mtd;
 
-	cfg.boot_stream1_address = simple_strtoul(argv[2], NULL, 16);
-	cfg.boot_stream1_size = simple_strtoul(argv[3], NULL, 16);
+	cfg.boot_stream1_address = hextoul(argv[2], NULL);
+	cfg.boot_stream1_size = hextoul(argv[3], NULL);
 	cfg.boot_stream1_size = ALIGN(cfg.boot_stream1_size, mtd->writesize);
 
 	if (argc > 5) {
-		cfg.boot_stream2_address = simple_strtoul(argv[4], NULL, 16);
-		cfg.boot_stream2_size = simple_strtoul(argv[5], NULL, 16);
+		cfg.boot_stream2_address = hextoul(argv[4], NULL);
+		cfg.boot_stream2_size = hextoul(argv[5], NULL);
 		cfg.boot_stream2_size = ALIGN(cfg.boot_stream2_size,
 					      mtd->writesize);
 	}
@@ -1450,7 +1450,7 @@
 	if (nandbcb_set_boot_config(argc, argv, &cfg))
 		return CMD_RET_FAILURE;
 
-	addr = simple_strtoul(argv[1], &endp, 16);
+	addr = hextoul(argv[1], &endp);
 	if (*argv[1] == 0 || *endp != 0)
 		return CMD_RET_FAILURE;
 
diff --git a/arch/arm/mach-imx/hab.c b/arch/arm/mach-imx/hab.c
index 00bd157..cc39e6b 100644
--- a/arch/arm/mach-imx/hab.c
+++ b/arch/arm/mach-imx/hab.c
@@ -609,12 +609,12 @@
 	if (argc < 3)
 		return CMD_RET_USAGE;
 
-	addr = simple_strtoul(argv[1], NULL, 16);
-	length = simple_strtoul(argv[2], NULL, 16);
+	addr = hextoul(argv[1], NULL);
+	length = hextoul(argv[2], NULL);
 	if (argc == 3)
 		ivt_offset = get_image_ivt_offset(addr);
 	else
-		ivt_offset = simple_strtoul(argv[3], NULL, 16);
+		ivt_offset = hextoul(argv[3], NULL);
 
 	rcode = imx_hab_authenticate_image(addr, length, ivt_offset);
 	if (rcode == 0)
diff --git a/arch/arm/mach-imx/imx8/ahab.c b/arch/arm/mach-imx/imx8/ahab.c
index 6392fe2..015267c 100644
--- a/arch/arm/mach-imx/imx8/ahab.c
+++ b/arch/arm/mach-imx/imx8/ahab.c
@@ -161,7 +161,7 @@
 	if (argc < 2)
 		return CMD_RET_USAGE;
 
-	addr = simple_strtoul(argv[1], NULL, 16);
+	addr = hextoul(argv[1], NULL);
 
 	printf("Authenticate OS container at 0x%lx\n", addr);
 
diff --git a/arch/arm/mach-imx/imx8/snvs_security_sc.c b/arch/arm/mach-imx/imx8/snvs_security_sc.c
index 6f9b1c9..7c34ce6 100644
--- a/arch/arm/mach-imx/imx8/snvs_security_sc.c
+++ b/arch/arm/mach-imx/imx8/snvs_security_sc.c
@@ -638,24 +638,24 @@
 	if (argc != (NB_REGISTERS + 1))
 		return CMD_RET_USAGE;
 
-	conf.hp.lock = simple_strtoul(argv[++idx], NULL, 16);
-	conf.hp.secvio_ctl = simple_strtoul(argv[++idx], NULL, 16);
-	conf.lp.lock = simple_strtoul(argv[++idx], NULL, 16);
-	conf.lp.secvio_ctl = simple_strtoul(argv[++idx], NULL, 16);
-	conf.lp.tamper_filt_cfg = simple_strtoul(argv[++idx], NULL, 16);
-	conf.lp.tamper_det_cfg = simple_strtoul(argv[++idx], NULL, 16);
-	conf.lp.tamper_det_cfg2 = simple_strtoul(argv[++idx], NULL, 16);
-	conf.lp.tamper_filt1_cfg = simple_strtoul(argv[++idx], NULL, 16);
-	conf.lp.tamper_filt2_cfg = simple_strtoul(argv[++idx], NULL, 16);
-	conf.lp.act_tamper1_cfg = simple_strtoul(argv[++idx], NULL, 16);
-	conf.lp.act_tamper2_cfg = simple_strtoul(argv[++idx], NULL, 16);
-	conf.lp.act_tamper3_cfg = simple_strtoul(argv[++idx], NULL, 16);
-	conf.lp.act_tamper4_cfg = simple_strtoul(argv[++idx], NULL, 16);
-	conf.lp.act_tamper5_cfg = simple_strtoul(argv[++idx], NULL, 16);
-	conf.lp.act_tamper_ctl = simple_strtoul(argv[++idx], NULL, 16);
-	conf.lp.act_tamper_clk_ctl = simple_strtoul(argv[++idx], NULL, 16);
-	conf.lp.act_tamper_routing_ctl1 = simple_strtoul(argv[++idx], NULL, 16);
-	conf.lp.act_tamper_routing_ctl2 = simple_strtoul(argv[++idx], NULL, 16);
+	conf.hp.lock = hextoul(argv[++idx], NULL);
+	conf.hp.secvio_ctl = hextoul(argv[++idx], NULL);
+	conf.lp.lock = hextoul(argv[++idx], NULL);
+	conf.lp.secvio_ctl = hextoul(argv[++idx], NULL);
+	conf.lp.tamper_filt_cfg = hextoul(argv[++idx], NULL);
+	conf.lp.tamper_det_cfg = hextoul(argv[++idx], NULL);
+	conf.lp.tamper_det_cfg2 = hextoul(argv[++idx], NULL);
+	conf.lp.tamper_filt1_cfg = hextoul(argv[++idx], NULL);
+	conf.lp.tamper_filt2_cfg = hextoul(argv[++idx], NULL);
+	conf.lp.act_tamper1_cfg = hextoul(argv[++idx], NULL);
+	conf.lp.act_tamper2_cfg = hextoul(argv[++idx], NULL);
+	conf.lp.act_tamper3_cfg = hextoul(argv[++idx], NULL);
+	conf.lp.act_tamper4_cfg = hextoul(argv[++idx], NULL);
+	conf.lp.act_tamper5_cfg = hextoul(argv[++idx], NULL);
+	conf.lp.act_tamper_ctl = hextoul(argv[++idx], NULL);
+	conf.lp.act_tamper_clk_ctl = hextoul(argv[++idx], NULL);
+	conf.lp.act_tamper_routing_ctl1 = hextoul(argv[++idx], NULL);
+	conf.lp.act_tamper_routing_ctl2 = hextoul(argv[++idx], NULL);
 
 	err = apply_snvs_config(&conf);
 
@@ -690,12 +690,12 @@
 	if (argc != (6 + 1))
 		return CMD_RET_USAGE;
 
-	conf.tamper_offset_ctl = simple_strtoul(argv[++idx], NULL, 16);
-	conf.tamper_pull_ctl = simple_strtoul(argv[++idx], NULL, 16);
-	conf.tamper_ana_test_ctl = simple_strtoul(argv[++idx], NULL, 16);
-	conf.tamper_sensor_trim_ctl = simple_strtoul(argv[++idx], NULL, 16);
-	conf.tamper_misc_ctl = simple_strtoul(argv[++idx], NULL, 16);
-	conf.tamper_core_volt_mon_ctl = simple_strtoul(argv[++idx], NULL, 16);
+	conf.tamper_offset_ctl = hextoul(argv[++idx], NULL);
+	conf.tamper_pull_ctl = hextoul(argv[++idx], NULL);
+	conf.tamper_ana_test_ctl = hextoul(argv[++idx], NULL);
+	conf.tamper_sensor_trim_ctl = hextoul(argv[++idx], NULL);
+	conf.tamper_misc_ctl = hextoul(argv[++idx], NULL);
+	conf.tamper_core_volt_mon_ctl = hextoul(argv[++idx], NULL);
 
 	err = apply_snvs_dgo_config(&conf);
 
@@ -727,7 +727,7 @@
 		return CMD_RET_USAGE;
 
 	conf.pad = simple_strtoul(argv[++idx], NULL, 10);
-	conf.mux_conf = simple_strtoul(argv[++idx], NULL, 16);
+	conf.mux_conf = hextoul(argv[++idx], NULL);
 
 	err = apply_tamper_pin_list_config(&conf, 1);
 
@@ -761,8 +761,8 @@
 	if (argc != (2 + 1))
 		return CMD_RET_USAGE;
 
-	conf.lp.status = simple_strtoul(argv[++idx], NULL, 16);
-	conf.lp.tamper_det_status = simple_strtoul(argv[++idx], NULL, 16);
+	conf.lp.status = hextoul(argv[++idx], NULL);
+	conf.lp.tamper_det_status = hextoul(argv[++idx], NULL);
 
 	scierr = check_write_secvio_config(SC_CONF_OFFSET_OF(lp.status),
 					   &conf.lp.status, NULL, NULL, NULL,
diff --git a/arch/arm/mach-imx/imx_bootaux.c b/arch/arm/mach-imx/imx_bootaux.c
index 30fb45d..9ffe5ac 100644
--- a/arch/arm/mach-imx/imx_bootaux.c
+++ b/arch/arm/mach-imx/imx_bootaux.c
@@ -180,7 +180,7 @@
 		return CMD_RET_SUCCESS;
 	}
 
-	addr = simple_strtoul(argv[1], NULL, 16);
+	addr = hextoul(argv[1], NULL);
 
 	if (!addr)
 		return CMD_RET_FAILURE;
diff --git a/arch/arm/mach-imx/mx6/mp.c b/arch/arm/mach-imx/mx6/mp.c
index 2fdf070..de9ace0 100644
--- a/arch/arm/mach-imx/mx6/mp.c
+++ b/arch/arm/mach-imx/mx6/mp.c
@@ -47,7 +47,7 @@
 {
 	uint32_t boot_addr;
 
-	boot_addr = simple_strtoul(argv[0], NULL, 16);
+	boot_addr = hextoul(argv[0], NULL);
 
 	switch (nr) {
 	case 1:
diff --git a/arch/arm/mach-keystone/cmd_mon.c b/arch/arm/mach-keystone/cmd_mon.c
index 049d573..e26296b 100644
--- a/arch/arm/mach-keystone/cmd_mon.c
+++ b/arch/arm/mach-keystone/cmd_mon.c
@@ -25,7 +25,7 @@
 
 	freq = CONFIG_SYS_HZ_CLOCK;
 
-	addr = simple_strtoul(argv[1], NULL, 16);
+	addr = hextoul(argv[1], NULL);
 
 	header = (struct image_header *)addr;
 
@@ -40,7 +40,7 @@
 	       size);
 
 	if (argc >=  3)
-		ecrypt_bm_addr = simple_strtoul(argv[2], NULL, 16);
+		ecrypt_bm_addr = hextoul(argv[2], NULL);
 
 	rcode = mon_install(load_addr, dpsc_base, freq, ecrypt_bm_addr);
 	printf("## installed monitor @ 0x%x, freq [%d], status %d\n",
@@ -76,8 +76,8 @@
 	if (argc < 3)
 		return CMD_RET_USAGE;
 
-	core_id = simple_strtoul(argv[1], NULL, 16);
-	on = simple_strtoul(argv[2], NULL, 16);
+	core_id = hextoul(argv[1], NULL);
+	on = hextoul(argv[2], NULL);
 
 	if (on)
 		rcode = mon_power_on(core_id, fn);
diff --git a/arch/arm/mach-snapdragon/misc.c b/arch/arm/mach-snapdragon/misc.c
index aaa561c..985625a 100644
--- a/arch/arm/mach-snapdragon/misc.c
+++ b/arch/arm/mach-snapdragon/misc.c
@@ -47,7 +47,7 @@
 	mac[0] = 0x02;
 	mac[1] = 00;
 	for (i = 3; i >= 0; i--) {
-		mac[i + 2] = simple_strtoul(&sn[2 * i], NULL, 16);
+		mac[i + 2] = hextoul(&sn[2 * i], NULL);
 		sn[2 * i] = 0;
 	}
 }
diff --git a/arch/arm/mach-socfpga/misc.c b/arch/arm/mach-socfpga/misc.c
index 64a7c9d..f8d3d48 100644
--- a/arch/arm/mach-socfpga/misc.c
+++ b/arch/arm/mach-socfpga/misc.c
@@ -191,7 +191,7 @@
 	argv++;
 
 	if (argc == 3)
-		mask = simple_strtoul(argv[1], NULL, 16);
+		mask = hextoul(argv[1], NULL);
 
 	switch (*argv[0]) {
 	case 'e':	/* Enable */
diff --git a/arch/arm/mach-socfpga/vab.c b/arch/arm/mach-socfpga/vab.c
index 85b3f30..e146f2c 100644
--- a/arch/arm/mach-socfpga/vab.c
+++ b/arch/arm/mach-socfpga/vab.c
@@ -17,8 +17,8 @@
 	if (argc < 3)
 		return CMD_RET_USAGE;
 
-	addr = simple_strtoul(argv[1], NULL, 16);
-	len = simple_strtoul(argv[2], NULL, 16);
+	addr = hextoul(argv[1], NULL);
+	len = hextoul(argv[2], NULL);
 
 	if (socfpga_vendor_authentication((void *)&addr, (size_t *)&len) != 0)
 		return CMD_RET_FAILURE;
diff --git a/arch/arm/mach-stm32mp/cmd_stm32key.c b/arch/arm/mach-stm32mp/cmd_stm32key.c
index 50840b0..68f2892 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32key.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32key.c
@@ -162,7 +162,7 @@
 		return CMD_RET_SUCCESS;
 	}
 
-	addr = simple_strtoul(argv[1], NULL, 16);
+	addr = hextoul(argv[1], NULL);
 	if (!addr)
 		return CMD_RET_USAGE;
 
@@ -185,7 +185,7 @@
 		yes = true;
 	}
 
-	addr = simple_strtoul(argv[argc - 1], NULL, 16);
+	addr = hextoul(argv[argc - 1], NULL);
 	if (!addr)
 		return CMD_RET_USAGE;
 
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c b/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c
index 064f51b..bf9a686 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c
@@ -64,12 +64,12 @@
 	addr = STM32_DDR_BASE;
 	size = 0;
 	if (argc > 3) {
-		addr = simple_strtoul(argv[3], NULL, 16);
+		addr = hextoul(argv[3], NULL);
 		if (!addr)
 			return CMD_RET_FAILURE;
 	}
 	if (argc > 4)
-		size = simple_strtoul(argv[4], NULL, 16);
+		size = hextoul(argv[4], NULL);
 
 	/* check STM32IMAGE presence */
 	if (size == 0) {
diff --git a/arch/arm/mach-uniphier/board_late_init.c b/arch/arm/mach-uniphier/board_late_init.c
index b33c4b1..b5356ed 100644
--- a/arch/arm/mach-uniphier/board_late_init.c
+++ b/arch/arm/mach-uniphier/board_late_init.c
@@ -66,7 +66,7 @@
 		if (!str)
 			goto fail;
 
-		offset = simple_strtoul(str, &end, 16);
+		offset = hextoul(str, &end);
 		if (*end)
 			goto fail;
 	}
diff --git a/arch/arm/mach-zynqmp/mp.c b/arch/arm/mach-zynqmp/mp.c
index 74783ae..704520e 100644
--- a/arch/arm/mach-zynqmp/mp.c
+++ b/arch/arm/mach-zynqmp/mp.c
@@ -252,7 +252,7 @@
 			return 1;
 		}
 
-		u32 boot_addr = simple_strtoul(argv[0], NULL, 16);
+		u32 boot_addr = hextoul(argv[0], NULL);
 		u32 boot_addr_uniq = 0;
 		if (!(boot_addr == ZYNQMP_R5_LOVEC_ADDR ||
 		      boot_addr == ZYNQMP_R5_HIVEC_ADDR)) {
diff --git a/arch/mips/mach-octeon/bootoctlinux.c b/arch/mips/mach-octeon/bootoctlinux.c
index c195dc2..349da08 100644
--- a/arch/mips/mach-octeon/bootoctlinux.c
+++ b/arch/mips/mach-octeon/bootoctlinux.c
@@ -281,8 +281,7 @@
 		} else if (!strncmp(argv[arg], "forceboot", 9)) {
 			boot_args->forceboot = true;
 		} else if (!strncmp(argv[arg], "nodemask=", 9)) {
-			boot_args->node_mask = simple_strtoul(argv[arg] + 9,
-							      NULL, 16);
+			boot_args->node_mask = hextoul(argv[arg] + 9, NULL);
 		} else if (!strncmp(argv[arg], "numcores=", 9)) {
 			memset(node_values, 0, sizeof(node_values));
 			num_values = octeon_parse_nodes(node_values,
@@ -383,7 +382,7 @@
 						   argv[1][1] == 'x' ||
 						   argv[1][1] == 'X' ||
 						   argv[1][1] == '\0'))) {
-		addr = simple_strtoul(argv[1], NULL, 16);
+		addr = hextoul(argv[1], NULL);
 		if (!addr)
 			addr = CONFIG_SYS_LOAD_ADDR;
 		arg_start++;
diff --git a/arch/nds32/lib/bootm.c b/arch/nds32/lib/bootm.c
index b3b8bc2..4cb0f53 100644
--- a/arch/nds32/lib/bootm.c
+++ b/arch/nds32/lib/bootm.c
@@ -64,7 +64,7 @@
 
 	s = env_get("machid");
 	if (s) {
-		machid = simple_strtoul(s, NULL, 16);
+		machid = hextoul(s, NULL);
 		printf("Using machid 0x%x from environment\n", machid);
 	}
 
diff --git a/arch/nios2/lib/bootm.c b/arch/nios2/lib/bootm.c
index 2c8f973..5037467 100644
--- a/arch/nios2/lib/bootm.c
+++ b/arch/nios2/lib/bootm.c
@@ -27,7 +27,7 @@
 		of_flat_tree = images->ft_addr;
 #endif
 	if (!of_flat_tree && argc > 1)
-		of_flat_tree = (char *)simple_strtoul(argv[1], NULL, 16);
+		of_flat_tree = (char *)hextoul(argv[1], NULL);
 	if (of_flat_tree)
 		initrd_end = (ulong)of_flat_tree;
 
diff --git a/arch/powerpc/cpu/mpc83xx/ecc.c b/arch/powerpc/cpu/mpc83xx/ecc.c
index 1343dd3..68a7a78 100644
--- a/arch/powerpc/cpu/mpc83xx/ecc.c
+++ b/arch/powerpc/cpu/mpc83xx/ecc.c
@@ -219,17 +219,17 @@
 			ddr->err_detect = val;
 			return 0;
 		} else if (strcmp(argv[1], "injectdatahi") == 0) {
-			val = simple_strtoul(argv[2], NULL, 16);
+			val = hextoul(argv[2], NULL);
 
 			ddr->data_err_inject_hi = val;
 			return 0;
 		} else if (strcmp(argv[1], "injectdatalo") == 0) {
-			val = simple_strtoul(argv[2], NULL, 16);
+			val = hextoul(argv[2], NULL);
 
 			ddr->data_err_inject_lo = val;
 			return 0;
 		} else if (strcmp(argv[1], "injectecc") == 0) {
-			val = simple_strtoul(argv[2], NULL, 16);
+			val = hextoul(argv[2], NULL);
 			if (val > 0xff) {
 				printf("Incorrect ECC inject mask, "
 				       "should be 0x00..0xff\n");
@@ -269,8 +269,8 @@
 	}
 	if (argc == 4) {
 		if (strcmp(argv[1], "testdw") == 0) {
-			addr = (u64 *) simple_strtoul(argv[2], NULL, 16);
-			count = simple_strtoul(argv[3], NULL, 16);
+			addr = (u64 *)hextoul(argv[2], NULL);
+			count = hextoul(argv[3], NULL);
 
 			if ((u32) addr % 8) {
 				printf("Address not aligned on "
@@ -308,8 +308,8 @@
 			return 0;
 		}
 		if (strcmp(argv[1], "testword") == 0) {
-			addr = (u64 *) simple_strtoul(argv[2], NULL, 16);
-			count = simple_strtoul(argv[3], NULL, 16);
+			addr = (u64 *)hextoul(argv[2], NULL);
+			count = hextoul(argv[3], NULL);
 
 			if ((u32) addr % 8) {
 				printf("Address not aligned on "
diff --git a/arch/powerpc/cpu/mpc85xx/mp.c b/arch/powerpc/cpu/mpc85xx/mp.c
index 653efe0..b1b002c 100644
--- a/arch/powerpc/cpu/mpc85xx/mp.c
+++ b/arch/powerpc/cpu/mpc85xx/mp.c
@@ -167,7 +167,7 @@
 	for (i = 1; i < 3; i++) {
 		if (argv[i][0] != '-') {
 			u8 entry = boot_entry_map[i];
-			val = simple_strtoul(argv[i], NULL, 16);
+			val = hextoul(argv[i], NULL);
 			table[entry] = val;
 		}
 	}
diff --git a/arch/sh/lib/zimageboot.c b/arch/sh/lib/zimageboot.c
index c38f093..c2e285f 100644
--- a/arch/sh/lib/zimageboot.c
+++ b/arch/sh/lib/zimageboot.c
@@ -37,11 +37,12 @@
 	}
 
 	if (s0)
-		zboot_entry = (ulong (*)(int, char * const []))simple_strtoul(s0, NULL, 16);
+		zboot_entry = (ulong (*)(int, char * const []))hextoul(s0,
+									NULL);
 
 	/* empty_zero_page */
 	if (s1)
-		param = (unsigned char*)simple_strtoul(s1, NULL, 16);
+		param = (unsigned char *)hextoul(s1, NULL);
 
 	/* Linux kernel command line */
 	cmdline = (char *)param + COMMAND_LINE;
diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c
index cf4210c..9938c80 100644
--- a/arch/x86/lib/zimage.c
+++ b/arch/x86/lib/zimage.c
@@ -405,17 +405,17 @@
 	}
 
 	if (s)
-		state.bzimage_addr = simple_strtoul(s, NULL, 16);
+		state.bzimage_addr = hextoul(s, NULL);
 
 	if (argc >= 3) {
 		/* argv[2] holds the size of the bzImage */
-		state.bzimage_size = simple_strtoul(argv[2], NULL, 16);
+		state.bzimage_size = hextoul(argv[2], NULL);
 	}
 
 	if (argc >= 4)
-		state.initrd_addr = simple_strtoul(argv[3], NULL, 16);
+		state.initrd_addr = hextoul(argv[3], NULL);
 	if (argc >= 5)
-		state.initrd_size = simple_strtoul(argv[4], NULL, 16);
+		state.initrd_size = hextoul(argv[4], NULL);
 	if (argc >= 6) {
 		/*
 		 * When the base_ptr is passed in, we assume that the image is
@@ -428,7 +428,7 @@
 		 * load address and set bzimage_addr to 0 so we know that it
 		 * cannot be proceesed (or processed again).
 		 */
-		state.base_ptr = (void *)simple_strtoul(argv[5], NULL, 16);
+		state.base_ptr = (void *)hextoul(argv[5], NULL);
 		state.load_address = state.bzimage_addr;
 		state.bzimage_addr = 0;
 	}
@@ -702,7 +702,7 @@
 	struct boot_params *base_ptr = state.base_ptr;
 
 	if (argc > 1)
-		base_ptr = (void *)simple_strtoul(argv[1], NULL, 16);
+		base_ptr = (void *)hextoul(argv[1], NULL);
 	if (!base_ptr) {
 		printf("No zboot setup_base\n");
 		return CMD_RET_FAILURE;
@@ -749,7 +749,7 @@
 	if (argc > 1) {
 		char *endp;
 
-		simple_strtoul(argv[1], &endp, 16);
+		hextoul(argv[1], &endp);
 		/*
 		 * endp pointing to nul means that argv[1] was just a valid
 		 * number, so pass it along to the normal processing