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

Commit 46d026ac authored by Dmitry Eremin-Solenikov's avatar Dmitry Eremin-Solenikov Committed by Kumar Gala
Browse files

powerpc/85xx: consolidate of_platform_bus_probe calls



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

Signed-off-by: default avatarDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
parent 543a07b1
Loading
Loading
Loading
Loading
+1 −16
Original line number Diff line number Diff line
@@ -190,22 +190,7 @@ static void ksi8560_show_cpuinfo(struct seq_file *m)
	seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
}

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

static int __init declare_of_platform_devices(void)
{
	of_platform_bus_probe(NULL, of_bus_ids, NULL);

	return 0;
}
machine_device_initcall(ksi8560, declare_of_platform_devices);
machine_device_initcall(ksi8560, mpc85xx_common_publish_devices);

/*
 * Called very early, device-tree isn't unflattened
+1 −13
Original line number Diff line number Diff line
@@ -106,19 +106,7 @@ static void __init mpc8536_ds_setup_arch(void)
	printk("MPC8536 DS board from Freescale Semiconductor\n");
}

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

static int __init mpc8536_ds_publish_devices(void)
{
	return of_platform_bus_probe(NULL, mpc8536_ds_ids, NULL);
}
machine_device_initcall(mpc8536_ds, mpc8536_ds_publish_devices);
machine_device_initcall(mpc8536_ds, mpc85xx_common_publish_devices);

machine_arch_initcall(mpc8536_ds, swiotlb_setup_bus_notifier);

+2 −0
Original line number Diff line number Diff line
#ifndef MPC85xx_H
#define MPC85xx_H
extern int mpc85xx_common_publish_devices(void);

#ifdef CONFIG_CPM2
extern void mpc85xx_cpm2_pic_init(void);
#else
+1 −17
Original line number Diff line number Diff line
@@ -193,23 +193,7 @@ static void mpc85xx_ads_show_cpuinfo(struct seq_file *m)
	seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
}

static struct of_device_id __initdata of_bus_ids[] = {
	{ .name = "soc", },
	{ .type = "soc", },
	{ .name = "cpm", },
	{ .name = "localbus", },
	{ .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(mpc85xx_ads, declare_of_platform_devices);
machine_device_initcall(mpc85xx_ads, mpc85xx_common_publish_devices);

/*
 * Called very early, device-tree isn't unflattened
+1 −13
Original line number Diff line number Diff line
@@ -332,19 +332,7 @@ static int __init mpc85xx_cds_probe(void)
        return of_flat_dt_is_compatible(root, "MPC85xxCDS");
}

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

static int __init declare_of_platform_devices(void)
{
	return of_platform_bus_probe(NULL, of_bus_ids, NULL);
}
machine_device_initcall(mpc85xx_cds, declare_of_platform_devices);
machine_device_initcall(mpc85xx_cds, mpc85xx_common_publish_devices);

define_machine(mpc85xx_cds) {
	.name		= "MPC85xx CDS",
Loading