Skip to content

Commit

Permalink
ARM: imx: Initialize SoC ID on i.MX50
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Fabio Estevam <[email protected]>
Signed-off-by: Shawn Guo <[email protected]>
  • Loading branch information
neuschaefer authored and Shawn Guo committed May 13, 2021
1 parent 89b7594 commit 22b5059
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions arch/arm/mach-imx/mach-imx50.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,19 @@
#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",
NULL
};

DT_MACHINE_START(IMX50_DT, "Freescale i.MX50 (Device Tree Support)")
.init_early = imx50_init_early,
.dt_compat = imx50_dt_board_compat,
MACHINE_END
3 changes: 3 additions & 0 deletions drivers/soc/imx/soc-imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,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:
ocotp_compat = "fsl,imx51-iim";
soc_id = "i.MX51";
Expand Down
1 change: 1 addition & 0 deletions include/soc/imx/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 22b5059

Please sign in to comment.