Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d7f8a085 authored by Vineet Gupta's avatar Vineet Gupta
Browse files

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: default avatarVineet Gupta <vgupta@synopsys.com>
parent 70e95648
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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=""
+9 −1
Original line number Diff line number Diff line
@@ -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();

+0 −12
Original line number Diff line number Diff line
@@ -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
+0 −1
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@

menuconfig ARC_PLAT_TB10X
	bool "Abilis TB10x"
	select COMMON_CLK
	select PINCTRL
	select PINCTRL_TB10X
	select PINMUX
+0 −13
Original line number Diff line number Diff line
@@ -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