aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/ralink
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2013-04-13 09:15:51 -0400
committerRalf Baechle <ralf@linux-mips.org>2013-05-07 19:19:12 -0400
commitdd63b00804a5c842fb73b6afc52f928f0c209a07 (patch)
tree5796ffd3350bae994462e481380090e6d5cd1572 /arch/mips/ralink
parent51e396078412ef91f222b9834f09308746ac7049 (diff)
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 <blogic@openwrt.org> Patchwork: http://patchwork.linux-mips.org/patch/5184/
Diffstat (limited to 'arch/mips/ralink')
-rw-r--r--arch/mips/ralink/of.c9
1 files changed, 9 insertions, 0 deletions
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 @@
11#include <linux/io.h> 11#include <linux/io.h>
12#include <linux/clk.h> 12#include <linux/clk.h>
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/sizes.h>
14#include <linux/of_fdt.h> 15#include <linux/of_fdt.h>
15#include <linux/kernel.h> 16#include <linux/kernel.h>
16#include <linux/bootmem.h> 17#include <linux/bootmem.h>
@@ -85,6 +86,14 @@ void __init plat_mem_setup(void)
85 * parsed resulting in our memory appearing 86 * parsed resulting in our memory appearing
86 */ 87 */
87 __dt_setup_arch(&__dtb_start); 88 __dt_setup_arch(&__dtb_start);
89
90 if (soc_info.mem_size)
91 add_memory_region(soc_info.mem_base, soc_info.mem_size,
92 BOOT_MEM_RAM);
93 else
94 detect_memory_region(soc_info.mem_base,
95 soc_info.mem_size_min * SZ_1M,
96 soc_info.mem_size_max * SZ_1M);
88} 97}
89 98
90static int __init plat_of_setup(void) 99static int __init plat_of_setup(void)