Message ID | 20190808101110.21912-4-peng.fan@nxp.com |
---|---|
State | Accepted |
Commit | 81ae46c2e69f2864d73caa59a35e0887d155705e |
Delegated to: | Stefano Babic |
Headers | show |
Series | [U-Boot,v2,1/5] arm: dts: sync dts for i.MX6UL | expand |
> Add i.MX6ULZ cpu type and helper. > > Signed-off-by: Peng Fan <peng.fan@nxp.com> > --- > > V2: > None > > arch/arm/include/asm/arch-imx/cpu.h | 1 + > arch/arm/include/asm/mach-imx/sys_proto.h | 1 + > arch/arm/mach-imx/cpu.c | 2 ++ > arch/arm/mach-imx/mx6/soc.c | 4 ++++ > 4 files changed, 8 insertions(+) > > diff --git a/arch/arm/include/asm/arch-imx/cpu.h b/arch/arm/include/asm/arch-imx/cpu.h > index d4a83eef72..073efcd1b4 100644 > --- a/arch/arm/include/asm/arch-imx/cpu.h > +++ b/arch/arm/include/asm/arch-imx/cpu.h > @@ -17,6 +17,7 @@ > #define MXC_CPU_MX6Q 0x63 > #define MXC_CPU_MX6UL 0x64 > #define MXC_CPU_MX6ULL 0x65 > +#define MXC_CPU_MX6ULZ 0x6B > #define MXC_CPU_MX6SOLO 0x66 /* dummy */ > #define MXC_CPU_MX6SLL 0x67 > #define MXC_CPU_MX6D 0x6A > diff --git a/arch/arm/include/asm/mach-imx/sys_proto.h b/arch/arm/include/asm/mach-imx/sys_proto.h > index 4925dd7894..260608062e 100644 > --- a/arch/arm/include/asm/mach-imx/sys_proto.h > +++ b/arch/arm/include/asm/mach-imx/sys_proto.h > @@ -38,6 +38,7 @@ > #define is_mx6solo() (is_cpu_type(MXC_CPU_MX6SOLO)) > #define is_mx6ul() (is_cpu_type(MXC_CPU_MX6UL)) > #define is_mx6ull() (is_cpu_type(MXC_CPU_MX6ULL)) > +#define is_mx6ulz() (is_cpu_type(MXC_CPU_MX6ULZ)) > #define is_mx6sll() (is_cpu_type(MXC_CPU_MX6SLL)) > > #define is_mx7ulp() (is_cpu_type(MXC_CPU_MX7ULP)) > diff --git a/arch/arm/mach-imx/cpu.c b/arch/arm/mach-imx/cpu.c > index 6e9a175210..73ce7f8d7d 100644 > --- a/arch/arm/mach-imx/cpu.c > +++ b/arch/arm/mach-imx/cpu.c > @@ -173,6 +173,8 @@ const char *get_imx_type(u32 imxtype) > return "6UL"; /* Ultra-Lite version of the mx6 */ > case MXC_CPU_MX6ULL: > return "6ULL"; /* ULL version of the mx6 */ > + case MXC_CPU_MX6ULZ: > + return "6ULZ"; /* ULZ version of the mx6 */ > case MXC_CPU_MX51: > return "51"; > case MXC_CPU_MX53: > diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c > index 075d2467ce..d37d3856d3 100644 > --- a/arch/arm/mach-imx/mx6/soc.c > +++ b/arch/arm/mach-imx/mx6/soc.c > @@ -85,6 +85,10 @@ u32 get_cpu_rev(void) > type = MXC_CPU_MX6D; > } > > + if (type == MXC_CPU_MX6ULL) { > + if (readl(SRC_BASE_ADDR + 0x1c) & (1 << 6)) > + type = MXC_CPU_MX6ULZ; > + } > } > major = ((reg >> 8) & 0xff); > if ((major >= 1) && > Reviewed-by: Ye Li <ye.li@nxp.com> Best regards, Ye Li
On Thu, Aug 8, 2019 at 6:55 AM Peng Fan <peng.fan@nxp.com> wrote: > > Add i.MX6ULZ cpu type and helper. > > Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
diff --git a/arch/arm/include/asm/arch-imx/cpu.h b/arch/arm/include/asm/arch-imx/cpu.h index d4a83eef72..073efcd1b4 100644 --- a/arch/arm/include/asm/arch-imx/cpu.h +++ b/arch/arm/include/asm/arch-imx/cpu.h @@ -17,6 +17,7 @@ #define MXC_CPU_MX6Q 0x63 #define MXC_CPU_MX6UL 0x64 #define MXC_CPU_MX6ULL 0x65 +#define MXC_CPU_MX6ULZ 0x6B #define MXC_CPU_MX6SOLO 0x66 /* dummy */ #define MXC_CPU_MX6SLL 0x67 #define MXC_CPU_MX6D 0x6A diff --git a/arch/arm/include/asm/mach-imx/sys_proto.h b/arch/arm/include/asm/mach-imx/sys_proto.h index 4925dd7894..260608062e 100644 --- a/arch/arm/include/asm/mach-imx/sys_proto.h +++ b/arch/arm/include/asm/mach-imx/sys_proto.h @@ -38,6 +38,7 @@ #define is_mx6solo() (is_cpu_type(MXC_CPU_MX6SOLO)) #define is_mx6ul() (is_cpu_type(MXC_CPU_MX6UL)) #define is_mx6ull() (is_cpu_type(MXC_CPU_MX6ULL)) +#define is_mx6ulz() (is_cpu_type(MXC_CPU_MX6ULZ)) #define is_mx6sll() (is_cpu_type(MXC_CPU_MX6SLL)) #define is_mx7ulp() (is_cpu_type(MXC_CPU_MX7ULP)) diff --git a/arch/arm/mach-imx/cpu.c b/arch/arm/mach-imx/cpu.c index 6e9a175210..73ce7f8d7d 100644 --- a/arch/arm/mach-imx/cpu.c +++ b/arch/arm/mach-imx/cpu.c @@ -173,6 +173,8 @@ const char *get_imx_type(u32 imxtype) return "6UL"; /* Ultra-Lite version of the mx6 */ case MXC_CPU_MX6ULL: return "6ULL"; /* ULL version of the mx6 */ + case MXC_CPU_MX6ULZ: + return "6ULZ"; /* ULZ version of the mx6 */ case MXC_CPU_MX51: return "51"; case MXC_CPU_MX53: diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c index 075d2467ce..d37d3856d3 100644 --- a/arch/arm/mach-imx/mx6/soc.c +++ b/arch/arm/mach-imx/mx6/soc.c @@ -85,6 +85,10 @@ u32 get_cpu_rev(void) type = MXC_CPU_MX6D; } + if (type == MXC_CPU_MX6ULL) { + if (readl(SRC_BASE_ADDR + 0x1c) & (1 << 6)) + type = MXC_CPU_MX6ULZ; + } } major = ((reg >> 8) & 0xff); if ((major >= 1) &&
Add i.MX6ULZ cpu type and helper. Signed-off-by: Peng Fan <peng.fan@nxp.com> --- V2: None arch/arm/include/asm/arch-imx/cpu.h | 1 + arch/arm/include/asm/mach-imx/sys_proto.h | 1 + arch/arm/mach-imx/cpu.c | 2 ++ arch/arm/mach-imx/mx6/soc.c | 4 ++++ 4 files changed, 8 insertions(+)