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

Commit 3a12502b authored by Abhimanyu Kapur's avatar Abhimanyu Kapur Committed by Kaushal Kumar
Browse files

ARM/ARM64: Introduce arch_read_hardware_id



Moving towards device tree and arm single binary referring to
machine descriptor name for hardware id information under
/proc/cpuinfo is not suitable for certain soc vendors. Add a
hook for soc vendors to supply a per-soc hardware read method.

Change-Id: Ifcccdffa3c0e1e8b5f96837eb1c023e468d4c287
Signed-off-by: default avatarAbhimanyu Kapur <abhimany@codeaurora.org>
Signed-off-by: default avatarKaushal Kumar <kaushalk@codeaurora.org>
parent 676c9bc2
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -94,6 +94,7 @@ unsigned int cold_boot;
EXPORT_SYMBOL(cold_boot);

static const char *cpu_name;
static const char *machine_name;
phys_addr_t __fdt_pointer __initdata;

/*
@@ -326,7 +327,8 @@ static void __init setup_machine_fdt(phys_addr_t dt_phys)
			cpu_relax();
	}

	dump_stack_set_arch_desc("%s (DT)", of_flat_dt_get_machine_name());
	machine_name = of_flat_dt_get_machine_name();
	dump_stack_set_arch_desc("%s (DT)", machine_name);
}

/*
@@ -555,6 +557,11 @@ static int c_show(struct seq_file *m, void *v)
		seq_printf(m, "CPU revision\t: %d\n\n", MIDR_REVISION(midr));
	}

	if (!arch_read_hardware_id)
		seq_printf(m, "Hardware\t: %s\n", machine_name);
	else
		seq_printf(m, "Hardware\t: %s\n", arch_read_hardware_id());

	return 0;
}