diff options
Diffstat (limited to 'arch/mips/jz4740/setup.c')
-rw-r--r-- | arch/mips/jz4740/setup.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/mips/jz4740/setup.c b/arch/mips/jz4740/setup.c index 8c08d7dcda66..1bed3cb062b3 100644 --- a/arch/mips/jz4740/setup.c +++ b/arch/mips/jz4740/setup.c @@ -18,6 +18,7 @@ #include <linux/io.h> #include <linux/irqchip.h> #include <linux/kernel.h> +#include <linux/libfdt.h> #include <linux/of_fdt.h> #include <linux/of_platform.h> @@ -55,9 +56,14 @@ static void __init jz4740_detect_mem(void) void __init plat_mem_setup(void) { + int offset; + jz4740_reset_init(); - jz4740_detect_mem(); __dt_setup_arch(__dtb_start); + + offset = fdt_path_offset(__dtb_start, "/memory"); + if (offset < 0) + jz4740_detect_mem(); } void __init device_tree_init(void) |