diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dfu/dfu_mtd.c | 4 | ||||
-rw-r--r-- | drivers/dfu/dfu_nand.c | 4 | ||||
-rw-r--r-- | drivers/dfu/dfu_ram.c | 4 | ||||
-rw-r--r-- | drivers/dfu/dfu_sf.c | 4 | ||||
-rw-r--r-- | drivers/fastboot/fb_command.c | 2 | ||||
-rw-r--r-- | drivers/gpio/pca953x.c | 4 | ||||
-rw-r--r-- | drivers/misc/ds4510.c | 10 | ||||
-rw-r--r-- | drivers/net/e1000_spi.c | 4 | ||||
-rw-r--r-- | drivers/net/fm/fdt.c | 2 | ||||
-rw-r--r-- | drivers/net/fsl-mc/mc.c | 3 | ||||
-rw-r--r-- | drivers/net/pfe_eth/pfe_cmd.c | 14 | ||||
-rw-r--r-- | drivers/net/phy/b53.c | 10 | ||||
-rw-r--r-- | drivers/net/phy/mv88e6352.c | 2 | ||||
-rw-r--r-- | drivers/power/power_core.c | 6 | ||||
-rw-r--r-- | drivers/qe/qe.c | 4 | ||||
-rw-r--r-- | drivers/rtc/m41t60.c | 2 | ||||
-rw-r--r-- | drivers/video/ati_radeon_fb.c | 2 | ||||
-rw-r--r-- | drivers/video/cfb_console.c | 2 | ||||
-rw-r--r-- | drivers/video/mx3fb.c | 2 |
19 files changed, 42 insertions, 43 deletions
diff --git a/drivers/dfu/dfu_mtd.c b/drivers/dfu/dfu_mtd.c index 894b570875..a31d4804be 100644 --- a/drivers/dfu/dfu_mtd.c +++ b/drivers/dfu/dfu_mtd.c @@ -268,9 +268,9 @@ int dfu_fill_entity_mtd(struct dfu_entity *dfu, char *devstr, char *s) st = strsep(&s, " "); if (!strcmp(st, "raw")) { dfu->layout = DFU_RAW_ADDR; - dfu->data.mtd.start = simple_strtoul(s, &s, 16); + dfu->data.mtd.start = hextoul(s, &s); s++; - dfu->data.mtd.size = simple_strtoul(s, &s, 16); + dfu->data.mtd.size = hextoul(s, &s); } else if ((!strcmp(st, "part")) || (!strcmp(st, "partubi"))) { char mtd_id[32]; struct mtd_device *mtd_dev; diff --git a/drivers/dfu/dfu_nand.c b/drivers/dfu/dfu_nand.c index b8d24d203b..6ddf80b78a 100644 --- a/drivers/dfu/dfu_nand.c +++ b/drivers/dfu/dfu_nand.c @@ -204,9 +204,9 @@ int dfu_fill_entity_nand(struct dfu_entity *dfu, char *devstr, char *s) st = strsep(&s, " "); if (!strcmp(st, "raw")) { dfu->layout = DFU_RAW_ADDR; - dfu->data.nand.start = simple_strtoul(s, &s, 16); + dfu->data.nand.start = hextoul(s, &s); s++; - dfu->data.nand.size = simple_strtoul(s, &s, 16); + dfu->data.nand.size = hextoul(s, &s); } else if ((!strcmp(st, "part")) || (!strcmp(st, "partubi"))) { char mtd_id[32]; struct mtd_device *mtd_dev; diff --git a/drivers/dfu/dfu_ram.c b/drivers/dfu/dfu_ram.c index ab0ce9e6fa..cc7e45ba33 100644 --- a/drivers/dfu/dfu_ram.c +++ b/drivers/dfu/dfu_ram.c @@ -74,8 +74,8 @@ int dfu_fill_entity_ram(struct dfu_entity *dfu, char *devstr, char *s) } dfu->layout = DFU_RAM_ADDR; - dfu->data.ram.start = simple_strtoul(argv[1], NULL, 16); - dfu->data.ram.size = simple_strtoul(argv[2], NULL, 16); + dfu->data.ram.start = hextoul(argv[1], NULL); + dfu->data.ram.size = hextoul(argv[2], NULL); dfu->write_medium = dfu_write_medium_ram; dfu->get_medium_size = dfu_get_medium_size_ram; diff --git a/drivers/dfu/dfu_sf.c b/drivers/dfu/dfu_sf.c index 8f8c425977..ef5231980e 100644 --- a/drivers/dfu/dfu_sf.c +++ b/drivers/dfu/dfu_sf.c @@ -171,9 +171,9 @@ int dfu_fill_entity_sf(struct dfu_entity *dfu, char *devstr, char *s) st = strsep(&s, " "); if (!strcmp(st, "raw")) { dfu->layout = DFU_RAW_ADDR; - dfu->data.sf.start = simple_strtoul(s, &s, 16); + dfu->data.sf.start = hextoul(s, &s); s++; - dfu->data.sf.size = simple_strtoul(s, &s, 16); + dfu->data.sf.size = hextoul(s, &s); } else if (CONFIG_IS_ENABLED(DFU_SF_PART) && (!strcmp(st, "part") || !strcmp(st, "partubi"))) { char mtd_id[32]; diff --git a/drivers/fastboot/fb_command.c b/drivers/fastboot/fb_command.c index 3a5db5b08f..98eccc3455 100644 --- a/drivers/fastboot/fb_command.c +++ b/drivers/fastboot/fb_command.c @@ -208,7 +208,7 @@ static void download(char *cmd_parameter, char *response) return; } fastboot_bytes_received = 0; - fastboot_bytes_expected = simple_strtoul(cmd_parameter, &tmp, 16); + fastboot_bytes_expected = hextoul(cmd_parameter, &tmp); if (fastboot_bytes_expected == 0) { fastboot_fail("Expected nonzero image size", response); return; diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c index 4ab8cee2d1..2fd2996798 100644 --- a/drivers/gpio/pca953x.c +++ b/drivers/gpio/pca953x.c @@ -221,11 +221,11 @@ static int do_pca953x(struct cmd_tbl *cmdtp, int flag, int argc, /* arg2 used as chip number or pin number */ if (argc > 2) - ul_arg2 = simple_strtoul(argv[2], NULL, 16); + ul_arg2 = hextoul(argv[2], NULL); /* arg3 used as pin or invert value */ if (argc > 3) - ul_arg3 = simple_strtoul(argv[3], NULL, 16) & 0x1; + ul_arg3 = hextoul(argv[3], NULL) & 0x1; switch ((long)c->cmd) { case PCA953X_CMD_INFO: diff --git a/drivers/misc/ds4510.c b/drivers/misc/ds4510.c index a2a5291565..9340596f2c 100644 --- a/drivers/misc/ds4510.c +++ b/drivers/misc/ds4510.c @@ -271,11 +271,11 @@ int do_ds4510(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) /* arg2 used as chip addr and pin number */ if (argc > 2) - ul_arg2 = simple_strtoul(argv[2], NULL, 16); + ul_arg2 = hextoul(argv[2], NULL); /* arg3 used as output/pullup value */ if (argc > 3) - ul_arg3 = simple_strtoul(argv[3], NULL, 16); + ul_arg3 = hextoul(argv[3], NULL); switch ((int)c->cmd) { case DS4510_CMD_DEVICE: @@ -337,9 +337,9 @@ int do_ds4510(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) else return cmd_usage(cmdtp); - addr = simple_strtoul(argv[3], NULL, 16); - off += simple_strtoul(argv[4], NULL, 16); - cnt = simple_strtoul(argv[5], NULL, 16); + addr = hextoul(argv[3], NULL); + off += hextoul(argv[4], NULL); + cnt = hextoul(argv[5], NULL); if ((off + cnt) > end) { printf("ERROR: invalid len\n"); diff --git a/drivers/net/e1000_spi.c b/drivers/net/e1000_spi.c index 4fcc65d978..69adf282c7 100644 --- a/drivers/net/e1000_spi.c +++ b/drivers/net/e1000_spi.c @@ -399,7 +399,7 @@ static int do_e1000_spi_dump(struct cmd_tbl *cmdtp, struct e1000_hw *hw, } /* Parse the arguments */ - dest = (void *)simple_strtoul(argv[0], NULL, 16); + dest = (void *)hextoul(argv[0], NULL); offset = simple_strtoul(argv[1], NULL, 0); length = simple_strtoul(argv[2], NULL, 0); @@ -444,7 +444,7 @@ static int do_e1000_spi_program(struct cmd_tbl *cmdtp, struct e1000_hw *hw, } /* Parse the arguments */ - source = (const void *)simple_strtoul(argv[0], NULL, 16); + source = (const void *)hextoul(argv[0], NULL); offset = simple_strtoul(argv[1], NULL, 0); length = simple_strtoul(argv[2], NULL, 0); diff --git a/drivers/net/fm/fdt.c b/drivers/net/fm/fdt.c index 242d27a34e..3855d7d58f 100644 --- a/drivers/net/fm/fdt.c +++ b/drivers/net/fm/fdt.c @@ -42,7 +42,7 @@ void fdt_fixup_fman_firmware(void *blob) if (!p) return; - fmanfw = (struct qe_firmware *)simple_strtoul(p, NULL, 16); + fmanfw = (struct qe_firmware *)hextoul(p, NULL); if (!fmanfw) return; diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c index 914ec001ec..3712221eba 100644 --- a/drivers/net/fsl-mc/mc.c +++ b/drivers/net/fsl-mc/mc.c @@ -956,8 +956,7 @@ unsigned long mc_get_dram_block_size(void) char *dram_block_size_env_var = env_get(MC_MEM_SIZE_ENV_VAR); if (dram_block_size_env_var) { - dram_block_size = simple_strtoul(dram_block_size_env_var, NULL, - 16); + dram_block_size = hextoul(dram_block_size_env_var, NULL); if (dram_block_size < CONFIG_SYS_LS_MC_DRAM_BLOCK_MIN_SIZE) { printf("fsl-mc: WARNING: Invalid value for \'" diff --git a/drivers/net/pfe_eth/pfe_cmd.c b/drivers/net/pfe_eth/pfe_cmd.c index 364750f65c..2fe0db0fe7 100644 --- a/drivers/net/pfe_eth/pfe_cmd.c +++ b/drivers/net/pfe_eth/pfe_cmd.c @@ -41,7 +41,7 @@ static void pfe_command_pe(int argc, char *const argv[]) } id = simple_strtoul(argv[4], NULL, 0); - addr = simple_strtoul(argv[5], NULL, 16); + addr = hextoul(argv[5], NULL); size = 4; for (i = 0; i < num; i++, addr += 4) { @@ -75,7 +75,7 @@ static void pfe_command_pe(int argc, char *const argv[]) } id = simple_strtoul(argv[4], NULL, 0); - addr = simple_strtoul(argv[5], NULL, 16); + addr = hextoul(argv[5], NULL); size = 4; for (i = 0; i < num; i++, addr += 4) { @@ -99,9 +99,9 @@ static void pfe_command_pe(int argc, char *const argv[]) } id = simple_strtoul(argv[4], NULL, 0); - val = simple_strtoul(argv[5], NULL, 16); + val = hextoul(argv[5], NULL); val = cpu_to_be32(val); - addr = simple_strtoul(argv[6], NULL, 16); + addr = hextoul(argv[6], NULL); size = 4; pe_dmem_write(id, val, addr, size); } else { @@ -123,7 +123,7 @@ static void pfe_command_pe(int argc, char *const argv[]) return; } - offset = simple_strtoul(argv[4], NULL, 16); + offset = hextoul(argv[4], NULL); for (i = 0; i < num; i++, offset += 4) { pe_lmem_read(&val, 4, offset); @@ -141,9 +141,9 @@ static void pfe_command_pe(int argc, char *const argv[]) return; } - val = simple_strtoul(argv[4], NULL, 16); + val = hextoul(argv[4], NULL); val = cpu_to_be32(val); - offset = simple_strtoul(argv[5], NULL, 16); + offset = hextoul(argv[5], NULL); pe_lmem_write(&val, 4, offset); } else { printf("Usage: pfe pe lmem [read | write] <parameters>\n"); diff --git a/drivers/net/phy/b53.c b/drivers/net/phy/b53.c index 21da53c7e5..695fac47b6 100644 --- a/drivers/net/phy/b53.c +++ b/drivers/net/phy/b53.c @@ -646,8 +646,8 @@ int do_b53_reg_read(const char *name, int argc, char *const argv[]) return ret; } - page = simple_strtoul(argv[1], NULL, 16); - offset = simple_strtoul(argv[2], NULL, 16); + page = hextoul(argv[1], NULL); + offset = hextoul(argv[2], NULL); width = simple_strtoul(argv[3], NULL, 10); switch (width) { @@ -698,13 +698,13 @@ int do_b53_reg_write(const char *name, int argc, char *const argv[]) return ret; } - page = simple_strtoul(argv[1], NULL, 16); - offset = simple_strtoul(argv[2], NULL, 16); + page = hextoul(argv[1], NULL); + offset = hextoul(argv[2], NULL); width = simple_strtoul(argv[3], NULL, 10); if (width == 48 || width == 64) value64 = simple_strtoull(argv[4], NULL, 16); else - value = simple_strtoul(argv[4], NULL, 16); + value = hextoul(argv[4], NULL); switch (width) { case 8: diff --git a/drivers/net/phy/mv88e6352.c b/drivers/net/phy/mv88e6352.c index 62a7f19214..07a8e50b48 100644 --- a/drivers/net/phy/mv88e6352.c +++ b/drivers/net/phy/mv88e6352.c @@ -256,7 +256,7 @@ int do_mvsw_reg_write(const char *name, int argc, char *const argv[]) phyaddr = simple_strtoul(argv[1], NULL, 10); port = simple_strtoul(argv[2], NULL, 10); reg = simple_strtoul(argv[3], NULL, 10); - value = simple_strtoul(argv[4], NULL, 16); + value = hextoul(argv[4], NULL); ret = sw_reg_write(name, phyaddr, port, reg, value); diff --git a/drivers/power/power_core.c b/drivers/power/power_core.c index eeed8e24a9..4f7ba099cd 100644 --- a/drivers/power/power_core.c +++ b/drivers/power/power_core.c @@ -159,7 +159,7 @@ static int do_pmic(struct cmd_tbl *cmdtp, int flag, int argc, if (argc < 4) return CMD_RET_USAGE; - reg = simple_strtoul(argv[3], NULL, 16); + reg = hextoul(argv[3], NULL); ret = pmic_reg_read(p, reg, &val); if (ret) @@ -174,8 +174,8 @@ static int do_pmic(struct cmd_tbl *cmdtp, int flag, int argc, if (argc < 5) return CMD_RET_USAGE; - reg = simple_strtoul(argv[3], NULL, 16); - val = simple_strtoul(argv[4], NULL, 16); + reg = hextoul(argv[3], NULL); + val = hextoul(argv[4], NULL); pmic_reg_write(p, reg, val); return CMD_RET_SUCCESS; diff --git a/drivers/qe/qe.c b/drivers/qe/qe.c index 97883ffc87..bd0a10c9d2 100644 --- a/drivers/qe/qe.c +++ b/drivers/qe/qe.c @@ -794,7 +794,7 @@ static int qe_cmd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) return cmd_usage(cmdtp); if (strcmp(argv[1], "fw") == 0) { - addr = simple_strtoul(argv[2], NULL, 16); + addr = hextoul(argv[2], NULL); if (!addr) { printf("Invalid address\n"); @@ -807,7 +807,7 @@ static int qe_cmd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) */ if (argc > 3) { - ulong length = simple_strtoul(argv[3], NULL, 16); + ulong length = hextoul(argv[3], NULL); struct qe_firmware *firmware = (void *)addr; if (length != be32_to_cpu(firmware->header.length)) { diff --git a/drivers/rtc/m41t60.c b/drivers/rtc/m41t60.c index 692042b935..b8ad33e012 100644 --- a/drivers/rtc/m41t60.c +++ b/drivers/rtc/m41t60.c @@ -214,7 +214,7 @@ void rtc_reset(void) * the M41T60 documentation for further details. */ if (s) { - unsigned long const l = simple_strtoul(s, 0, 16); + unsigned long const l = hextoul(s, 0); if (l <= 0x3F) { if ((data[RTC_CTRL] & 0x3F) != l) { diff --git a/drivers/video/ati_radeon_fb.c b/drivers/video/ati_radeon_fb.c index c4da2e3ae7..383666781c 100644 --- a/drivers/video/ati_radeon_fb.c +++ b/drivers/video/ati_radeon_fb.c @@ -642,7 +642,7 @@ void *video_hw_init(void) if (penv) { /* deceide if it is a string */ if (penv[0] <= '9') { - videomode = (int) simple_strtoul (penv, NULL, 16); + videomode = (int)hextoul(penv, NULL); tmp = 1; } } else { diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 1f491a48d6..5e1ee061e8 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -1857,7 +1857,7 @@ static void *video_logo(void) ret = splash_screen_prepare(); if (ret < 0) return video_fb_address; - addr = simple_strtoul(s, NULL, 16); + addr = hextoul(s, NULL); if (video_display_bitmap(addr, video_logo_xpos, diff --git a/drivers/video/mx3fb.c b/drivers/video/mx3fb.c index 9b42ca8d03..e6dd2b83c6 100644 --- a/drivers/video/mx3fb.c +++ b/drivers/video/mx3fb.c @@ -820,7 +820,7 @@ void *video_hw_init(void) if (penv) { /* decide if it is a string */ if (penv[0] <= '9') { - videomode = (int) simple_strtoul(penv, NULL, 16); + videomode = (int)hextoul(penv, NULL); tmp = 1; } } else { |