diff options
Diffstat (limited to 'arch/arc/plat-arcfpga/platform.c')
-rw-r--r-- | arch/arc/plat-arcfpga/platform.c | 50 |
1 files changed, 42 insertions, 8 deletions
diff --git a/arch/arc/plat-arcfpga/platform.c b/arch/arc/plat-arcfpga/platform.c index b7f63e3f3cae..ac85d6927334 100644 --- a/arch/arc/plat-arcfpga/platform.c +++ b/arch/arc/plat-arcfpga/platform.c | |||
@@ -18,7 +18,9 @@ | |||
18 | #include <asm/setup.h> | 18 | #include <asm/setup.h> |
19 | #include <asm/irq.h> | 19 | #include <asm/irq.h> |
20 | #include <asm/clk.h> | 20 | #include <asm/clk.h> |
21 | #include <asm/mach_desc.h> | ||
21 | #include <plat/memmap.h> | 22 | #include <plat/memmap.h> |
23 | #include <plat/smp.h> | ||
22 | 24 | ||
23 | /*-----------------------BVCI Latency Unit -----------------------------*/ | 25 | /*-----------------------BVCI Latency Unit -----------------------------*/ |
24 | 26 | ||
@@ -153,10 +155,7 @@ static void arc_fpga_serial_init(void) | |||
153 | #endif | 155 | #endif |
154 | } | 156 | } |
155 | 157 | ||
156 | /* | 158 | static void __init plat_fpga_early_init(void) |
157 | * Early Platform Initialization called from setup_arch() | ||
158 | */ | ||
159 | void __init arc_platform_early_init(void) | ||
160 | { | 159 | { |
161 | pr_info("[plat-arcfpga]: registering early dev resources\n"); | 160 | pr_info("[plat-arcfpga]: registering early dev resources\n"); |
162 | 161 | ||
@@ -172,7 +171,7 @@ static struct of_dev_auxdata plat_auxdata_lookup[] __initdata = { | |||
172 | {} | 171 | {} |
173 | }; | 172 | }; |
174 | 173 | ||
175 | int __init fpga_plat_init(void) | 174 | static void __init plat_fpga_populate_dev(void) |
176 | { | 175 | { |
177 | pr_info("[plat-arcfpga]: registering device resources\n"); | 176 | pr_info("[plat-arcfpga]: registering device resources\n"); |
178 | 177 | ||
@@ -182,7 +181,42 @@ int __init fpga_plat_init(void) | |||
182 | */ | 181 | */ |
183 | of_platform_populate(NULL, of_default_bus_match_table, | 182 | of_platform_populate(NULL, of_default_bus_match_table, |
184 | plat_auxdata_lookup, NULL); | 183 | plat_auxdata_lookup, NULL); |
185 | |||
186 | return 0; | ||
187 | } | 184 | } |
188 | arch_initcall(fpga_plat_init); | 185 | |
186 | /*----------------------- Machine Descriptions ------------------------------ | ||
187 | * | ||
188 | * Machine description is simply a set of platform/board specific callbacks | ||
189 | * This is not directly related to DeviceTree based dynamic device creation, | ||
190 | * however as part of early device tree scan, we also select the right | ||
191 | * callback set, by matching the DT compatible name. | ||
192 | */ | ||
193 | |||
194 | static const char *aa4_compat[] __initdata = { | ||
195 | "snps,arc-angel4", | ||
196 | NULL, | ||
197 | }; | ||
198 | |||
199 | MACHINE_START(ANGEL4, "angel4") | ||
200 | .dt_compat = aa4_compat, | ||
201 | .init_early = plat_fpga_early_init, | ||
202 | .init_machine = plat_fpga_populate_dev, | ||
203 | .init_irq = plat_fpga_init_IRQ, | ||
204 | #ifdef CONFIG_SMP | ||
205 | .init_smp = iss_model_init_smp, | ||
206 | #endif | ||
207 | MACHINE_END | ||
208 | |||
209 | static const char *ml509_compat[] __initdata = { | ||
210 | "snps,arc-ml509", | ||
211 | NULL, | ||
212 | }; | ||
213 | |||
214 | MACHINE_START(ML509, "ml509") | ||
215 | .dt_compat = ml509_compat, | ||
216 | .init_early = plat_fpga_early_init, | ||
217 | .init_machine = plat_fpga_populate_dev, | ||
218 | .init_irq = plat_fpga_init_IRQ, | ||
219 | #ifdef CONFIG_SMP | ||
220 | .init_smp = iss_model_init_smp, | ||
221 | #endif | ||
222 | MACHINE_END | ||