From: John Crispin Date: Sat, 13 Apr 2013 13:15:51 +0000 (+0200) Subject: MIPS: ralink: make use of the new memory detection code X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dd63b00804a5c842fb73b6afc52f928f0c209a07;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git MIPS: ralink: make use of the new memory detection code Call detect_memory_region() from plat_mem_setup() unless the size was already read from the system controller. Signed-off-by: John Crispin Patchwork: http://patchwork.linux-mips.org/patch/5184/ --- diff --git a/arch/mips/ralink/of.c b/arch/mips/ralink/of.c index 4165e70775be..fb1569580def 100644 --- a/arch/mips/ralink/of.c +++ b/arch/mips/ralink/of.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -85,6 +86,14 @@ void __init plat_mem_setup(void) * parsed resulting in our memory appearing */ __dt_setup_arch(&__dtb_start); + + if (soc_info.mem_size) + add_memory_region(soc_info.mem_base, soc_info.mem_size, + BOOT_MEM_RAM); + else + detect_memory_region(soc_info.mem_base, + soc_info.mem_size_min * SZ_1M, + soc_info.mem_size_max * SZ_1M); } static int __init plat_of_setup(void)