Skip to content

Commit

Permalink
MIPS: ralink: make use of the new memory detection code
Browse files Browse the repository at this point in the history
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/
  • Loading branch information
John Crispin authored and Ralf Baechle committed May 7, 2013
1 parent 51e3960 commit dd63b00
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions arch/mips/ralink/of.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <linux/io.h>
#include <linux/clk.h>
#include <linux/init.h>
#include <linux/sizes.h>
#include <linux/of_fdt.h>
#include <linux/kernel.h>
#include <linux/bootmem.h>
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit dd63b00

Please sign in to comment.