diff options
Diffstat (limited to 'arch/mips/kernel/prom.c')
-rw-r--r-- | arch/mips/kernel/prom.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/mips/kernel/prom.c b/arch/mips/kernel/prom.c index 5d39bb85bf35..452d4350ce42 100644 --- a/arch/mips/kernel/prom.c +++ b/arch/mips/kernel/prom.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/debugfs.h> | 16 | #include <linux/debugfs.h> |
17 | #include <linux/of.h> | 17 | #include <linux/of.h> |
18 | #include <linux/of_fdt.h> | 18 | #include <linux/of_fdt.h> |
19 | #include <linux/of_platform.h> | ||
19 | 20 | ||
20 | #include <asm/page.h> | 21 | #include <asm/page.h> |
21 | #include <asm/prom.h> | 22 | #include <asm/prom.h> |
@@ -54,4 +55,21 @@ void __init __dt_setup_arch(void *bph) | |||
54 | 55 | ||
55 | mips_set_machine_name(of_flat_dt_get_machine_name()); | 56 | mips_set_machine_name(of_flat_dt_get_machine_name()); |
56 | } | 57 | } |
58 | |||
59 | int __init __dt_register_buses(const char *bus0, const char *bus1) | ||
60 | { | ||
61 | static struct of_device_id of_ids[3]; | ||
62 | |||
63 | if (!of_have_populated_dt()) | ||
64 | panic("device tree not present"); | ||
65 | |||
66 | strlcpy(of_ids[0].compatible, bus0, sizeof(of_ids[0].compatible)); | ||
67 | strlcpy(of_ids[1].compatible, bus1, sizeof(of_ids[1].compatible)); | ||
68 | |||
69 | if (of_platform_populate(NULL, of_ids, NULL, NULL)) | ||
70 | panic("failed to populate DT"); | ||
71 | |||
72 | return 0; | ||
73 | } | ||
74 | |||
57 | #endif | 75 | #endif |