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

Commit 7669d58c authored by Dmitry Eremin-Solenikov's avatar Dmitry Eremin-Solenikov Committed by Kumar Gala
Browse files

powerpc/83xx: consolidate of_platform_bus_probe calls



83xx board files have a lot of duplication in
*_declare_of_platform_devices() functions. Merge that into a single
function common to most of the boards.

The only leftover is mpc834x_itx.c board file which explicitly asks for
fsl,pq2pro-localbus, as corresponding bindings don't provide
"simple-bus" compatibility in localbus node.

Signed-off-by: default avatarDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
parent d4fb5ebd
Loading
Loading
Loading
Loading
+1 −14
Original line number Diff line number Diff line
@@ -36,20 +36,7 @@ static void __init asp834x_setup_arch(void)
	mpc834x_usb_cfg();
}

static struct __initdata of_device_id asp8347_ids[] = {
	{ .type = "soc", },
	{ .compatible = "soc", },
	{ .compatible = "simple-bus", },
	{ .compatible = "gianfar", },
	{},
};

static int __init asp8347_declare_of_platform_devices(void)
{
	of_platform_bus_probe(NULL, asp8347_ids, NULL);
	return 0;
}
machine_device_initcall(asp834x, asp8347_declare_of_platform_devices);
machine_device_initcall(asp834x, mpc83xx_declare_of_platform_devices);

/*
 * Called very early, MMU is off, device-tree isn't unflattened
+1 −17
Original line number Diff line number Diff line
@@ -122,23 +122,7 @@ static void __init mpc83xx_km_setup_arch(void)
#endif				/* CONFIG_QUICC_ENGINE */
}

static struct of_device_id kmpbec83xx_ids[] = {
	{ .type = "soc", },
	{ .compatible = "soc", },
	{ .compatible = "simple-bus", },
	{ .type = "qe", },
	{ .compatible = "fsl,qe", },
	{},
};

static int __init kmeter_declare_of_platform_devices(void)
{
	/* Publish the QE devices */
	of_platform_bus_probe(NULL, kmpbec83xx_ids, NULL);

	return 0;
}
machine_device_initcall(mpc83xx_km, kmeter_declare_of_platform_devices);
machine_device_initcall(mpc83xx_km, mpc83xx_declare_of_platform_devices);

/* list of the supported boards */
static char *board[] __initdata = {
+17 −0
Original line number Diff line number Diff line
@@ -111,3 +111,20 @@ void __init mpc83xx_ipic_and_qe_init_IRQ(void)
	mpc83xx_qe_init_IRQ();
}
#endif /* CONFIG_QUICC_ENGINE */

static struct of_device_id __initdata of_bus_ids[] = {
	{ .type = "soc", },
	{ .compatible = "soc", },
	{ .compatible = "simple-bus" },
	{ .compatible = "gianfar" },
	{ .compatible = "gpio-leds", },
	{ .type = "qe", },
	{ .compatible = "fsl,qe", },
	{},
};

int __init mpc83xx_declare_of_platform_devices(void)
{
	of_platform_bus_probe(NULL, of_bus_ids, NULL);
	return 0;
}
+1 −12
Original line number Diff line number Diff line
@@ -56,18 +56,7 @@ static int __init mpc830x_rdb_probe(void)
	return of_flat_dt_match(of_get_flat_dt_root(), board);
}

static struct of_device_id __initdata of_bus_ids[] = {
	{ .compatible = "simple-bus" },
	{ .compatible = "gianfar" },
	{},
};

static int __init declare_of_platform_devices(void)
{
	of_platform_bus_probe(NULL, of_bus_ids, NULL);
	return 0;
}
machine_device_initcall(mpc830x_rdb, declare_of_platform_devices);
machine_device_initcall(mpc830x_rdb, mpc83xx_declare_of_platform_devices);

define_machine(mpc830x_rdb) {
	.name			= "MPC830x RDB",
+1 −13
Original line number Diff line number Diff line
@@ -58,19 +58,7 @@ static int __init mpc831x_rdb_probe(void)
	return of_flat_dt_match(of_get_flat_dt_root(), board);
}

static struct of_device_id __initdata of_bus_ids[] = {
	{ .compatible = "simple-bus" },
	{ .compatible = "gianfar" },
	{ .compatible = "gpio-leds", },
	{},
};

static int __init declare_of_platform_devices(void)
{
	of_platform_bus_probe(NULL, of_bus_ids, NULL);
	return 0;
}
machine_device_initcall(mpc831x_rdb, declare_of_platform_devices);
machine_device_initcall(mpc831x_rdb, mpc83xx_declare_of_platform_devices);

define_machine(mpc831x_rdb) {
	.name			= "MPC831x RDB",
Loading