Skip to contentSkip to conversation

ARM: imx: Initialize SoC ID on i.MX50

PATCH Applied Jonathan Neuschäfer 3 participants 3 messages Apr 24, 2021 – May 13, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: imx: Initialize SoC ID on i.MX50

As on i.MX51 and i.MX53, initialize the SoC ID based on the SoC compatible string of the board.

---
 arch/arm/mach-imx/mach-imx50.c | 7 +++++++
 drivers/soc/imx/soc-imx.c      | 3 +++
 include/soc/imx/cpu.h          | 1 +
 3 files changed, 11 insertions(+)
arch/arm/mach-imx/mach-imx50.c +7 -0
index f4da205f57db9..a2d35f9ba474a 100644
@@ -9,6 +9,12 @@
 #include <asm/mach/arch.h>
 
 #include "common.h"
+#include "hardware.h"
+
+static void __init imx50_init_early(void)
+{
+	mxc_set_cpu_type(MXC_CPU_MX50);
+}
 
 static const char * const imx50_dt_board_compat[] __initconst = {
 	"fsl,imx50",
@@ -16,5 +22,6 @@ static const char * const imx50_dt_board_compat[] __initconst = {
 };
 
 DT_MACHINE_START(IMX50_DT, "Freescale i.MX50 (Device Tree Support)")
+	.init_early	= imx50_init_early,
 	.dt_compat	= imx50_dt_board_compat,
 MACHINE_END
drivers/soc/imx/soc-imx.c +3 -0
index 01bfea1cb64a8..e11d237b883a9 100644
@@ -67,6 +67,9 @@ static int __init imx_soc_device_init(void)
 	case MXC_CPU_MX35:
 		soc_id = "i.MX35";
 		break;
+	case MXC_CPU_MX50:
+		soc_id = "i.MX50";
+		break;
 	case MXC_CPU_MX51:
 		soc_id = "i.MX51";
 		break;
include/soc/imx/cpu.h +1 -0
index 42d6aeb951fa6..0bf610acafd06 100644
@@ -9,6 +9,7 @@
 #define MXC_CPU_MX27		27
 #define MXC_CPU_MX31		31
 #define MXC_CPU_MX35		35
+#define MXC_CPU_MX50		50
 #define MXC_CPU_MX51		51
 #define MXC_CPU_MX53		53
 #define MXC_CPU_IMX6SL		0x60

--
2.30.2