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

Commit f2d57694 authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt Committed by Michael Ellerman
Browse files

powerpc: Get rid of ppc_md.init_early()



It is now called right after platform probe, so the probe function
can just do the job.

Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 56571384
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -53,7 +53,6 @@ struct machdep_calls {

	int		(*probe)(void);
	void		(*setup_arch)(void); /* Optional, may be NULL */
	void		(*init_early)(void);
	/* Optional, may be NULL. */
	void		(*show_cpuinfo)(struct seq_file *m);
	void		(*show_percpuinfo)(struct seq_file *m, int i);
+0 −3
Original line number Diff line number Diff line
@@ -263,9 +263,6 @@ void __init setup_arch(char **cmdline_p)

	setup_power_save();

	if (ppc_md.init_early)
		ppc_md.init_early();

	find_legacy_serial_ports();

	smp_setup_cpu_maps();
+0 −8
Original line number Diff line number Diff line
@@ -511,14 +511,6 @@ void __init setup_system(void)
	/* Probe the machine type */
	probe_machine();

	/*
	 * Do some platform specific early initializations, that includes
	 * setting up the hash table pointers. It also sets up some interrupt-mapping
	 * related options that will be used by finish_device_tree()
	 */
	if (ppc_md.init_early)
		ppc_md.init_early();

 	/*
	 * We can discover serial ports now since the above did setup the
	 * hash table management for us, thus ioremap works. We do that early
+6 −2
Original line number Diff line number Diff line
@@ -57,7 +57,12 @@ static void __init mpc5121_ads_init_IRQ(void)
 */
static int __init mpc5121_ads_probe(void)
{
	return of_machine_is_compatible("fsl,mpc5121ads");
	if (!of_machine_is_compatible("fsl,mpc5121ads"))
		return 0;

	mpc512x_init_early();

	return 1;
}

define_machine(mpc5121_ads) {
@@ -65,7 +70,6 @@ define_machine(mpc5121_ads) {
	.probe			= mpc5121_ads_probe,
	.setup_arch		= mpc5121_ads_setup_arch,
	.init			= mpc512x_init,
	.init_early		= mpc512x_init_early,
	.init_IRQ		= mpc5121_ads_init_IRQ,
	.get_irq		= ipic_get_irq,
	.calibrate_decr		= generic_calibrate_decr,
+6 −2
Original line number Diff line number Diff line
@@ -38,14 +38,18 @@ static const char * const board[] __initconst = {
 */
static int __init mpc512x_generic_probe(void)
{
	return of_device_compatible_match(of_root, board);
	if (!of_device_compatible_match(of_root, board))
		return 0;

	mpc512x_init_early();

	return 1;
}

define_machine(mpc512x_generic) {
	.name			= "MPC512x generic",
	.probe			= mpc512x_generic_probe,
	.init			= mpc512x_init,
	.init_early		= mpc512x_init_early,
	.setup_arch		= mpc512x_setup_arch,
	.init_IRQ		= mpc512x_init_IRQ,
	.get_irq		= ipic_get_irq,
Loading