1 From 1618a00f709817cbcdebf038d0b5e251c8d67237 Mon Sep 17 00:00:00 2001
2 From: John Crispin <blogic@openwrt.org>
3 Date: Sat, 13 Apr 2013 15:15:51 +0200
4 Subject: [PATCH 127/137] MIPS: ralink: make use of the new memory detection
7 Call detect_memory_region() from plat_mem_setup() unless the size was already
8 read from the system controller.
10 Signed-off-by: John Crispin <blogic@openwrt.org>
11 Patchwork: http://patchwork.linux-mips.org/patch/5184/
13 arch/mips/ralink/of.c | 9 +++++++++
14 1 file changed, 9 insertions(+)
16 --- a/arch/mips/ralink/of.c
17 +++ b/arch/mips/ralink/of.c
20 #include <linux/clk.h>
21 #include <linux/init.h>
22 +#include <linux/sizes.h>
23 #include <linux/of_fdt.h>
24 #include <linux/kernel.h>
25 #include <linux/bootmem.h>
26 @@ -85,6 +86,14 @@ void __init plat_mem_setup(void)
27 * parsed resulting in our memory appearing
29 __dt_setup_arch(&__dtb_start);
31 + if (soc_info.mem_size)
32 + add_memory_region(soc_info.mem_base, soc_info.mem_size,
35 + detect_memory_region(soc_info.mem_base,
36 + soc_info.mem_size_min * SZ_1M,
37 + soc_info.mem_size_max * SZ_1M);
40 static int __init plat_of_setup(void)