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: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:

committed by
Michael Ellerman

parent
406b0b6ae3
commit
5657138404
@@ -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();
|
||||
|
||||
|
Reference in New Issue
Block a user