|
@@ -16,6 +16,7 @@
|
|
#include <linux/debugfs.h>
|
|
#include <linux/debugfs.h>
|
|
#include <linux/of.h>
|
|
#include <linux/of.h>
|
|
#include <linux/of_fdt.h>
|
|
#include <linux/of_fdt.h>
|
|
|
|
+#include <linux/of_platform.h>
|
|
|
|
|
|
#include <asm/page.h>
|
|
#include <asm/page.h>
|
|
#include <asm/prom.h>
|
|
#include <asm/prom.h>
|
|
@@ -54,4 +55,21 @@ void __init __dt_setup_arch(void *bph)
|
|
|
|
|
|
mips_set_machine_name(of_flat_dt_get_machine_name());
|
|
mips_set_machine_name(of_flat_dt_get_machine_name());
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+int __init __dt_register_buses(const char *bus0, const char *bus1)
|
|
|
|
+{
|
|
|
|
+ static struct of_device_id of_ids[3];
|
|
|
|
+
|
|
|
|
+ if (!of_have_populated_dt())
|
|
|
|
+ panic("device tree not present");
|
|
|
|
+
|
|
|
|
+ strlcpy(of_ids[0].compatible, bus0, sizeof(of_ids[0].compatible));
|
|
|
|
+ strlcpy(of_ids[1].compatible, bus1, sizeof(of_ids[1].compatible));
|
|
|
|
+
|
|
|
|
+ if (of_platform_populate(NULL, of_ids, NULL, NULL))
|
|
|
|
+ panic("failed to populate DT");
|
|
|
|
+
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+
|
|
#endif
|
|
#endif
|