diff options
author | Ganesan Ramalingam <ganesanr@broadcom.com> | 2012-07-24 11:28:55 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2012-07-24 11:28:55 -0400 |
commit | fcf9b4de3374d0df79eb8e06c046006d3855e06e (patch) | |
tree | 70899ab8d609079e2e895701b12bce2b934a43b2 /arch/mips | |
parent | 57d7cdb630716c3f9cf7beadd05059c65a9acd25 (diff) |
MIPS: Netlogic: Add XLP SoC devices in FDT
Probe and add devices on SoC "simple-bus" on startup. This will
in turn add devices like I2C controller that are specified in the
device tree under 'soc'.
Signed-off-by: Ganesan Ramalingam <ganesanr@broadcom.com>
Signed-off-by: Jayachandran C <jayachandranc@netlogicmicro.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/3762/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/netlogic/xlp/setup.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/mips/netlogic/xlp/setup.c b/arch/mips/netlogic/xlp/setup.c index b3df7c2aad1e..3dec9f28b65b 100644 --- a/arch/mips/netlogic/xlp/setup.c +++ b/arch/mips/netlogic/xlp/setup.c | |||
@@ -41,6 +41,8 @@ | |||
41 | #include <asm/bootinfo.h> | 41 | #include <asm/bootinfo.h> |
42 | 42 | ||
43 | #include <linux/of_fdt.h> | 43 | #include <linux/of_fdt.h> |
44 | #include <linux/of_platform.h> | ||
45 | #include <linux/of_device.h> | ||
44 | 46 | ||
45 | #include <asm/netlogic/haldefs.h> | 47 | #include <asm/netlogic/haldefs.h> |
46 | #include <asm/netlogic/common.h> | 48 | #include <asm/netlogic/common.h> |
@@ -109,3 +111,17 @@ void __init prom_init(void) | |||
109 | register_smp_ops(&nlm_smp_ops); | 111 | register_smp_ops(&nlm_smp_ops); |
110 | #endif | 112 | #endif |
111 | } | 113 | } |
114 | |||
115 | static struct of_device_id __initdata xlp_ids[] = { | ||
116 | { .compatible = "simple-bus", }, | ||
117 | {}, | ||
118 | }; | ||
119 | |||
120 | int __init xlp8xx_ds_publish_devices(void) | ||
121 | { | ||
122 | if (!of_have_populated_dt()) | ||
123 | return 0; | ||
124 | return of_platform_bus_probe(NULL, xlp_ids, NULL); | ||
125 | } | ||
126 | |||
127 | device_initcall(xlp8xx_ds_publish_devices); | ||