MIPS: ralink: add missing SZ_1M multiplier
authorJohn Crispin <blogic@openwrt.org>
Thu, 6 Jun 2013 12:55:53 +0000 (12:55 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 6 Jun 2013 14:11:26 +0000 (16:11 +0200)
On RT5350 the memory size is set to Bytes and not MegaBytes due to a missing
multiplier.

Signed-off-by: John Crispin <blogic@openwrt.org>
Cc: John Crispin <blogic@openwrt.org>
Patchwork: https://patchwork.linux-mips.org/patch/5378/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/ralink/of.c

index fb1569580def7c25a03a7f1348315c4e93e92e3c..6b5f3406f414cd85de2230398a17ed9f7e047b3c 100644 (file)
@@ -88,7 +88,7 @@ void __init plat_mem_setup(void)
        __dt_setup_arch(&__dtb_start);
 
        if (soc_info.mem_size)
-               add_memory_region(soc_info.mem_base, soc_info.mem_size,
+               add_memory_region(soc_info.mem_base, soc_info.mem_size * SZ_1M,
                                  BOOT_MEM_RAM);
        else
                detect_memory_region(soc_info.mem_base,