|
@@ -18,6 +18,7 @@
|
|
#include <linux/io.h>
|
|
#include <linux/io.h>
|
|
#include <linux/irqchip.h>
|
|
#include <linux/irqchip.h>
|
|
#include <linux/kernel.h>
|
|
#include <linux/kernel.h>
|
|
|
|
+#include <linux/libfdt.h>
|
|
#include <linux/of_fdt.h>
|
|
#include <linux/of_fdt.h>
|
|
#include <linux/of_platform.h>
|
|
#include <linux/of_platform.h>
|
|
|
|
|
|
@@ -55,9 +56,14 @@ static void __init jz4740_detect_mem(void)
|
|
|
|
|
|
void __init plat_mem_setup(void)
|
|
void __init plat_mem_setup(void)
|
|
{
|
|
{
|
|
|
|
+ int offset;
|
|
|
|
+
|
|
jz4740_reset_init();
|
|
jz4740_reset_init();
|
|
- jz4740_detect_mem();
|
|
|
|
__dt_setup_arch(__dtb_start);
|
|
__dt_setup_arch(__dtb_start);
|
|
|
|
+
|
|
|
|
+ offset = fdt_path_offset(__dtb_start, "/memory");
|
|
|
|
+ if (offset < 0)
|
|
|
|
+ jz4740_detect_mem();
|
|
}
|
|
}
|
|
|
|
|
|
void __init device_tree_init(void)
|
|
void __init device_tree_init(void)
|