summaryrefslogtreecommitdiff
path: root/arch/mips/jz4740/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/jz4740/setup.c')
-rw-r--r--arch/mips/jz4740/setup.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/mips/jz4740/setup.c b/arch/mips/jz4740/setup.c
index ef796f97b996..d6bb7a39fafe 100644
--- a/arch/mips/jz4740/setup.c
+++ b/arch/mips/jz4740/setup.c
@@ -17,8 +17,11 @@
#include <linux/init.h>
#include <linux/io.h>
#include <linux/kernel.h>
+#include <linux/of_fdt.h>
+#include <linux/of_platform.h>
#include <asm/bootinfo.h>
+#include <asm/prom.h>
#include <asm/mach-jz4740/base.h>
@@ -53,8 +56,24 @@ void __init plat_mem_setup(void)
{
jz4740_reset_init();
jz4740_detect_mem();
+ __dt_setup_arch(__dtb_start);
}
+void __init device_tree_init(void)
+{
+ if (!initial_boot_params)
+ return;
+
+ unflatten_and_copy_device_tree();
+}
+
+static int __init populate_machine(void)
+{
+ of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+ return 0;
+}
+arch_initcall(populate_machine);
+
const char *get_system_type(void)
{
return "JZ4740";