|
@@ -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";
|