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

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

powerpc/64: Move 64-bit probe_machine() to later in the boot process



We no long need the machine type that early, so we can move probe_machine()
to after the device-tree has been expanded. This will allow further
consolidation.

Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 84b62c72
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -301,9 +301,6 @@ void __init early_setup(unsigned long dt_ptr)
	setup_paca(&paca[boot_cpuid]);
	fixup_boot_paca();

	/* Probe the machine type */
	probe_machine();

	/*
	 * Configure exception handlers. This include setting up trampolines
	 * if needed, setting exception endian mode, etc...
@@ -511,6 +508,9 @@ void __init setup_system(void)
	 */
	check_for_initrd();

	/* 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
+2 −4
Original line number Diff line number Diff line
@@ -255,10 +255,8 @@ static void __init cell_setup_arch(void)

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

	if (!of_flat_dt_is_compatible(root, "IBM,CBEA") &&
	    !of_flat_dt_is_compatible(root, "IBM,CPBW-1.0"))
	if (!of_machine_is_compatible("IBM,CBEA") &&
	    !of_machine_is_compatible("IBM,CPBW-1.0"))
		return 0;

	pm_power_off = rtas_power_off;
+2 −4
Original line number Diff line number Diff line
@@ -300,10 +300,8 @@ static void __init maple_progress(char *s, unsigned short hex)
 */
static int __init maple_probe(void)
{
	unsigned long root = of_get_flat_dt_root();

	if (!of_flat_dt_is_compatible(root, "Momentum,Maple") &&
	    !of_flat_dt_is_compatible(root, "Momentum,Apache"))
	if (!of_machine_is_compatible("Momentum,Maple") &&
	    !of_machine_is_compatible("Momentum,Apache"))
		return 0;

	pm_power_off = maple_power_off;
+2 −4
Original line number Diff line number Diff line
@@ -420,10 +420,8 @@ machine_device_initcall(pasemi, pasemi_publish_devices);
 */
static int __init pas_probe(void)
{
	unsigned long root = of_get_flat_dt_root();

	if (!of_flat_dt_is_compatible(root, "PA6T-1682M") &&
	    !of_flat_dt_is_compatible(root, "pasemi,pwrficient"))
	if (!of_machine_is_compatible("PA6T-1682M") &&
	    !of_machine_is_compatible("pasemi,pwrficient"))
		return 0;

	return 1;
+6 −0
Original line number Diff line number Diff line
@@ -590,11 +590,17 @@ console_initcall(check_pmac_serial_console);
 */
static int __init pmac_probe(void)
{
#ifdef CONFIG_PPC32
	unsigned long root = of_get_flat_dt_root();

	if (!of_flat_dt_is_compatible(root, "Power Macintosh") &&
	    !of_flat_dt_is_compatible(root, "MacRISC"))
		return 0;
#else
	if (!of_machine_is_compatible("Power Macintosh") &&
	    !of_machine_is_compatible("MacRISC"))
		return 0;
#endif

#ifdef CONFIG_PPC32
	/* isa_io_base gets set in pmac_pci_init */
Loading