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

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

powerpc: Move 32-bit probe() machine to later in the boot process



This converts all the 32-bit platforms to use the expanded device-tree
which is a pretty mechanical change. Unlike 64-bit, the 32-bit kernel
didn't rely on platform initializations to setup the MMU since it
sets it up entirely before probe_machine() so the move has comparatively
less consequences though it's a bigger patch.

Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 406b0b6a
Loading
Loading
Loading
Loading
+19 −16
Original line number Diff line number Diff line
@@ -113,23 +113,7 @@ notrace void __init machine_init(u64 dt_ptr)

	early_init_mmu();

	probe_machine();

	setup_kdump_trampoline();

#ifdef CONFIG_6xx
	if (cpu_has_feature(CPU_FTR_CAN_DOZE) ||
	    cpu_has_feature(CPU_FTR_CAN_NAP))
		ppc_md.power_save = ppc6xx_idle;
#endif

#ifdef CONFIG_E500
	if (cpu_has_feature(CPU_FTR_CAN_DOZE) ||
	    cpu_has_feature(CPU_FTR_CAN_NAP))
		ppc_md.power_save = e500_idle;
#endif
	if (ppc_md.progress)
		ppc_md.progress("id mach(): done", 0x200);
}

/* Checks "l2cr=xxxx" command-line option */
@@ -249,6 +233,21 @@ static void __init exc_lvl_early_init(void)
#define exc_lvl_early_init()
#endif

static void setup_power_save(void)
{
#ifdef CONFIG_6xx
	if (cpu_has_feature(CPU_FTR_CAN_DOZE) ||
	    cpu_has_feature(CPU_FTR_CAN_NAP))
		ppc_md.power_save = ppc6xx_idle;
#endif

#ifdef CONFIG_E500
	if (cpu_has_feature(CPU_FTR_CAN_DOZE) ||
	    cpu_has_feature(CPU_FTR_CAN_NAP))
		ppc_md.power_save = e500_idle;
#endif
}

/* Warning, IO base is not yet inited */
void __init setup_arch(char **cmdline_p)
{
@@ -260,6 +259,10 @@ void __init setup_arch(char **cmdline_p)
	unflatten_device_tree();
	check_for_initrd();

	probe_machine();

	setup_power_save();

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

+1 −3
Original line number Diff line number Diff line
@@ -105,9 +105,7 @@ static void __init ep405_setup_arch(void)

static int __init ep405_probe(void)
{
	unsigned long root = of_get_flat_dt_root();

	if (!of_flat_dt_is_compatible(root, "ep405"))
	if (!of_machine_is_compatible("ep405"))
		return 0;

	return 1;
+1 −1
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ static const char * const board[] __initconst = {

static int __init ppc40x_probe(void)
{
	if (of_flat_dt_match(of_get_flat_dt_root(), board)) {
	if (of_device_compatible_match(of_root, board)) {
		pci_set_flags(PCI_REASSIGN_ALL_RSRC);
		return 1;
	}
+1 −3
Original line number Diff line number Diff line
@@ -37,9 +37,7 @@ machine_device_initcall(virtex, virtex_device_probe);

static int __init virtex_probe(void)
{
	unsigned long root = of_get_flat_dt_root();

	if (!of_flat_dt_is_compatible(root, "xlnx,virtex"))
	if (!of_machine_is_compatible("xlnx,virtex"))
		return 0;

	return 1;
+1 −3
Original line number Diff line number Diff line
@@ -46,9 +46,7 @@ machine_device_initcall(walnut, walnut_device_probe);

static int __init walnut_probe(void)
{
	unsigned long root = of_get_flat_dt_root();

	if (!of_flat_dt_is_compatible(root, "ibm,walnut"))
	if (!of_machine_is_compatible("ibm,walnut"))
		return 0;

	pci_set_flags(PCI_REASSIGN_ALL_RSRC);
Loading