]> git.sur5r.net Git - u-boot/commitdiff
driver: net: fsl-mc: Use base 16 in simple_strtoul
authorPrabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Thu, 9 Nov 2017 09:15:41 +0000 (14:45 +0530)
committerYork Sun <york.sun@nxp.com>
Wed, 15 Nov 2017 18:53:15 +0000 (10:53 -0800)
Value provided in MC_MEM_SIZE_ENV_VAR is in hex. Use 16 as base
in simple_strtoul.

Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
arch/arm/cpu/armv8/fsl-layerscape/doc/README.lsch3
drivers/net/fsl-mc/mc.c

index 522760b0fa30de1e8fa33e25903b38c248d6e053..025a1b7b2e060b6be2926adbbcfe53a4a62e7bcb 100644 (file)
@@ -118,7 +118,7 @@ Environment Variables
 mcboottimeout: MC boot timeout in milliseconds. If this variable is not defined
                the value CONFIG_SYS_LS_MC_BOOT_TIMEOUT_MS will be assumed.
 
-mcmemsize:     MC DRAM block size. If this variable is not defined, the value
+mcmemsize:     MC DRAM block size in hex. If this variable is not defined, the value
                CONFIG_SYS_LS_MC_DRAM_BLOCK_MIN_SIZE will be assumed.
 
 mcinitcmd:     This environment variable is defined to initiate MC and DPL deployment
index be2b6117d77e95069d53802c818b04e524bf3332..c76f58253d6c6909de0ff90013b0d0b7e50c3d83 100644 (file)
@@ -826,7 +826,7 @@ unsigned long mc_get_dram_block_size(void)
 
        if (dram_block_size_env_var) {
                dram_block_size = simple_strtoul(dram_block_size_env_var, NULL,
-                                                10);
+                                                16);
 
                if (dram_block_size < CONFIG_SYS_LS_MC_DRAM_BLOCK_MIN_SIZE) {
                        printf("fsl-mc: WARNING: Invalid value for \'"