linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: imx: Initialize SoC ID on i.MX50
@ 2021-04-24 16:21 Jonathan Neuschäfer
  2021-04-26  1:08 ` Fabio Estevam
  2021-05-13  7:42 ` Shawn Guo
  0 siblings, 2 replies; 3+ messages in thread
From: Jonathan Neuschäfer @ 2021-04-24 16:21 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Jonathan Neuschäfer, Russell King, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team, Peng Fan,
	linux-kernel

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

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
---
 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(+)

diff --git a/arch/arm/mach-imx/mach-imx50.c b/arch/arm/mach-imx/mach-imx50.c
index f4da205f57db9..a2d35f9ba474a 100644
--- a/arch/arm/mach-imx/mach-imx50.c
+++ b/arch/arm/mach-imx/mach-imx50.c
@@ -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
diff --git a/drivers/soc/imx/soc-imx.c b/drivers/soc/imx/soc-imx.c
index 01bfea1cb64a8..e11d237b883a9 100644
--- a/drivers/soc/imx/soc-imx.c
+++ b/drivers/soc/imx/soc-imx.c
@@ -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;
diff --git a/include/soc/imx/cpu.h b/include/soc/imx/cpu.h
index 42d6aeb951fa6..0bf610acafd06 100644
--- a/include/soc/imx/cpu.h
+++ b/include/soc/imx/cpu.h
@@ -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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ARM: imx: Initialize SoC ID on i.MX50
  2021-04-24 16:21 [PATCH] ARM: imx: Initialize SoC ID on i.MX50 Jonathan Neuschäfer
@ 2021-04-26  1:08 ` Fabio Estevam
  2021-05-13  7:42 ` Shawn Guo
  1 sibling, 0 replies; 3+ messages in thread
From: Fabio Estevam @ 2021-04-26  1:08 UTC (permalink / raw)
  To: Jonathan Neuschäfer
  Cc: moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	Russell King, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	NXP Linux Team, Peng Fan, linux-kernel

Hi Jonathan,

On Sat, Apr 24, 2021 at 1:24 PM Jonathan Neuschäfer
<j.neuschaefer@gmx.net> wrote:
>
> As on i.MX51 and i.MX53, initialize the SoC ID based on the SoC
> compatible string of the board.
>
> Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>

Reviewed-by: Fabio Estevam <festevam@gmail.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ARM: imx: Initialize SoC ID on i.MX50
  2021-04-24 16:21 [PATCH] ARM: imx: Initialize SoC ID on i.MX50 Jonathan Neuschäfer
  2021-04-26  1:08 ` Fabio Estevam
@ 2021-05-13  7:42 ` Shawn Guo
  1 sibling, 0 replies; 3+ messages in thread
From: Shawn Guo @ 2021-05-13  7:42 UTC (permalink / raw)
  To: Jonathan Neuschäfer
  Cc: linux-arm-kernel, Russell King, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team, Peng Fan,
	linux-kernel

On Sat, Apr 24, 2021 at 06:21:27PM +0200, Jonathan Neuschäfer wrote:
> As on i.MX51 and i.MX53, initialize the SoC ID based on the SoC
> compatible string of the board.
> 
> Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>

Applied, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-13  7:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-24 16:21 [PATCH] ARM: imx: Initialize SoC ID on i.MX50 Jonathan Neuschäfer
2021-04-26  1:08 ` Fabio Estevam
2021-05-13  7:42 ` Shawn Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).