ARC: [plat*] move code out of .init_machine into common
All the platforms do the same thing in init_machine callback so move it out of callback into caller of callback Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
This commit is contained in:
parent
70e956483e
commit
d7f8a085d4
|
@ -9,6 +9,7 @@
|
|||
config ARC
|
||||
def_bool y
|
||||
select BUILDTIME_EXTABLE_SORT
|
||||
select COMMON_CLK
|
||||
select CLONE_BACKWARDS
|
||||
# ARC Busybox based initramfs absolutely relies on DEVTMPFS for /dev
|
||||
select DEVTMPFS if !INITRAMFS_SOURCE=""
|
||||
|
|
|
@ -13,7 +13,9 @@
|
|||
#include <linux/console.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/cpu.h>
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/of_fdt.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/cache.h>
|
||||
#include <asm/sections.h>
|
||||
#include <asm/arcregs.h>
|
||||
|
@ -379,7 +381,13 @@ void __init setup_arch(char **cmdline_p)
|
|||
|
||||
static int __init customize_machine(void)
|
||||
{
|
||||
/* Add platform devices */
|
||||
of_clk_init(NULL);
|
||||
/*
|
||||
* Traverses flattened DeviceTree - registering platform devices
|
||||
* (if any) complete with their resources
|
||||
*/
|
||||
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
|
||||
|
||||
if (machine_desc->init_machine)
|
||||
machine_desc->init_machine();
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include <linux/platform_device.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/console.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <asm/setup.h>
|
||||
#include <asm/clk.h>
|
||||
#include <asm/mach_desc.h>
|
||||
|
@ -31,15 +30,6 @@ static void __init plat_fpga_early_init(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
static void __init plat_fpga_populate_dev(void)
|
||||
{
|
||||
/*
|
||||
* Traverses flattened DeviceTree - registering platform devices
|
||||
* (if any) complete with their resources
|
||||
*/
|
||||
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
|
||||
}
|
||||
|
||||
/*----------------------- Machine Descriptions ------------------------------
|
||||
*
|
||||
* Machine description is simply a set of platform/board specific callbacks
|
||||
|
@ -57,7 +47,6 @@ static const char *legacy_fpga_compat[] __initconst = {
|
|||
MACHINE_START(LEGACY_FPGA, "legacy_fpga")
|
||||
.dt_compat = legacy_fpga_compat,
|
||||
.init_early = plat_fpga_early_init,
|
||||
.init_machine = plat_fpga_populate_dev,
|
||||
#ifdef CONFIG_ISS_SMP_EXTN
|
||||
.init_smp = iss_model_init_smp,
|
||||
#endif
|
||||
|
@ -71,5 +60,4 @@ static const char *simulation_compat[] __initconst = {
|
|||
|
||||
MACHINE_START(SIMULATION, "simulation")
|
||||
.dt_compat = simulation_compat,
|
||||
.init_machine = plat_fpga_populate_dev,
|
||||
MACHINE_END
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
menuconfig ARC_PLAT_TB10X
|
||||
bool "Abilis TB10x"
|
||||
select COMMON_CLK
|
||||
select PINCTRL
|
||||
select PINCTRL_TB10X
|
||||
select PINMUX
|
||||
|
|
|
@ -19,21 +19,9 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
|
||||
#include <asm/mach_desc.h>
|
||||
|
||||
|
||||
static void __init tb10x_platform_init(void)
|
||||
{
|
||||
of_clk_init(NULL);
|
||||
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
|
||||
}
|
||||
|
||||
static const char *tb10x_compat[] __initdata = {
|
||||
"abilis,arc-tb10x",
|
||||
NULL,
|
||||
|
@ -41,5 +29,4 @@ static const char *tb10x_compat[] __initdata = {
|
|||
|
||||
MACHINE_START(TB10x, "tb10x")
|
||||
.dt_compat = tb10x_compat,
|
||||
.init_machine = tb10x_platform_init,
|
||||
MACHINE_END
|
||||
|
|
Loading…
Reference in New Issue