1 From 6142d0fa1c7ba6050664a27d7cca87043217b01f 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 43/79] 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 diff --git a/arch/mips/ralink/of.c b/arch/mips/ralink/of.c
17 index 4165e70..fb15695 100644
18 --- a/arch/mips/ralink/of.c
19 +++ b/arch/mips/ralink/of.c
22 #include <linux/clk.h>
23 #include <linux/init.h>
24 +#include <linux/sizes.h>
25 #include <linux/of_fdt.h>
26 #include <linux/kernel.h>
27 #include <linux/bootmem.h>
28 @@ -85,6 +86,14 @@ void __init plat_mem_setup(void)
29 * parsed resulting in our memory appearing
31 __dt_setup_arch(&__dtb_start);
33 + if (soc_info.mem_size)
34 + add_memory_region(soc_info.mem_base, soc_info.mem_size,
37 + detect_memory_region(soc_info.mem_base,
38 + soc_info.mem_size_min * SZ_1M,
39 + soc_info.mem_size_max * SZ_1M);
42 static int __init plat_of_setup(void)