[PATCH 12/18] sparc32: recognize the legacy LEON firmware machine ID

From: Magnus Lindholm

Date: Thu Nov 26 2026 - 04:31:56 EST


Factory GR-LEON4-ITX firmware reports IDPROM type 0x31. Recognize that
legacy LEON identifier in the machine-name table. This only corrects
the diagnostic; CPU identification and IDPROM contents are unchanged.

Signed-off-by: Magnus Lindholm <linmag7@xxxxxxxxx>
---
arch/sparc/include/asm/machines.h | 1 +
arch/sparc/kernel/idprom.c | 2 ++
2 files changed, 3 insertions(+)

diff --git a/arch/sparc/include/asm/machines.h b/arch/sparc/include/asm/machines.h
index 9f78f70c6f11..ee79cc8e929c 100644
--- a/arch/sparc/include/asm/machines.h
+++ b/arch/sparc/include/asm/machines.h
@@ -32,6 +32,7 @@ struct Sun_Machine_Models {
#define SM_TYP_MASK 0x0f

/* Leon machines */
+#define M_LEON2_SOC 0x01 /* Legacy LEON firmware ID */
#define M_LEON3_SOC 0x02 /* Leon3 SoC */

/* Sun4m machines, these predate the OpenBoot. These values only mean
diff --git a/arch/sparc/kernel/idprom.c b/arch/sparc/kernel/idprom.c
index d6c46d512220..8aba9b4d4498 100644
--- a/arch/sparc/kernel/idprom.c
+++ b/arch/sparc/kernel/idprom.c
@@ -29,6 +29,8 @@ static struct idprom idprom_buffer;
*/
static struct Sun_Machine_Models Sun_Machines[] = {
/* First, Leon */
+{ .name = "LEON system (legacy firmware ID)",
+ .id_machtype = (M_LEON | M_LEON2_SOC) },
{ .name = "Leon3 System-on-a-Chip", .id_machtype = (M_LEON | M_LEON3_SOC) },
/* Finally, early Sun4m's */
{ .name = "Sun4m SparcSystem600", .id_machtype = (SM_SUN4M | SM_4M_SS60) },
--
2.43.0