mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
ARC: [Review] Multi-platform image #3: switch to board callback
-platform API is retired and instead callbacks are used Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Cc: Arnd Bergmann <arnd@arndb.de> Acked-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
parent
03a6d28cdd
commit
877768c84d
10 changed files with 48 additions and 26 deletions
|
@ -18,7 +18,9 @@
|
|||
#include <asm/setup.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/clk.h>
|
||||
#include <asm/mach_desc.h>
|
||||
#include <plat/memmap.h>
|
||||
#include <plat/smp.h>
|
||||
|
||||
/*-----------------------BVCI Latency Unit -----------------------------*/
|
||||
|
||||
|
@ -153,10 +155,7 @@ static void arc_fpga_serial_init(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Early Platform Initialization called from setup_arch()
|
||||
*/
|
||||
void __init arc_platform_early_init(void)
|
||||
static void __init plat_fpga_early_init(void)
|
||||
{
|
||||
pr_info("[plat-arcfpga]: registering early dev resources\n");
|
||||
|
||||
|
@ -172,7 +171,7 @@ static struct of_dev_auxdata plat_auxdata_lookup[] __initdata = {
|
|||
{}
|
||||
};
|
||||
|
||||
int __init fpga_plat_init(void)
|
||||
static void __init plat_fpga_populate_dev(void)
|
||||
{
|
||||
pr_info("[plat-arcfpga]: registering device resources\n");
|
||||
|
||||
|
@ -182,7 +181,42 @@ int __init fpga_plat_init(void)
|
|||
*/
|
||||
of_platform_populate(NULL, of_default_bus_match_table,
|
||||
plat_auxdata_lookup, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
arch_initcall(fpga_plat_init);
|
||||
|
||||
/*----------------------- Machine Descriptions ------------------------------
|
||||
*
|
||||
* Machine description is simply a set of platform/board specific callbacks
|
||||
* This is not directly related to DeviceTree based dynamic device creation,
|
||||
* however as part of early device tree scan, we also select the right
|
||||
* callback set, by matching the DT compatible name.
|
||||
*/
|
||||
|
||||
static const char *aa4_compat[] __initdata = {
|
||||
"snps,arc-angel4",
|
||||
NULL,
|
||||
};
|
||||
|
||||
MACHINE_START(ANGEL4, "angel4")
|
||||
.dt_compat = aa4_compat,
|
||||
.init_early = plat_fpga_early_init,
|
||||
.init_machine = plat_fpga_populate_dev,
|
||||
.init_irq = plat_fpga_init_IRQ,
|
||||
#ifdef CONFIG_SMP
|
||||
.init_smp = iss_model_init_smp,
|
||||
#endif
|
||||
MACHINE_END
|
||||
|
||||
static const char *ml509_compat[] __initdata = {
|
||||
"snps,arc-ml509",
|
||||
NULL,
|
||||
};
|
||||
|
||||
MACHINE_START(ML509, "ml509")
|
||||
.dt_compat = ml509_compat,
|
||||
.init_early = plat_fpga_early_init,
|
||||
.init_machine = plat_fpga_populate_dev,
|
||||
.init_irq = plat_fpga_init_IRQ,
|
||||
#ifdef CONFIG_SMP
|
||||
.init_smp = iss_model_init_smp,
|
||||
#endif
|
||||
MACHINE_END
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue