From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Sun, 23 Aug 2015 17:23:45 +0200 Subject: [U-Boot] [PATCH V2 3/5] imx: mx31 use new formula for get_cpu_rev In-Reply-To: <1439434534-18500-3-git-send-email-Peng.Fan@freescale.com> References: <1439434534-18500-1-git-send-email-Peng.Fan@freescale.com> <1439434534-18500-3-git-send-email-Peng.Fan@freescale.com> Message-ID: <55D9E581.8030207@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 13/08/2015 04:55, Peng Fan wrote: > Use new formula for get_cpu_rev, since we need to use this formula > to do runtime check for all i.MXes. > > Signed-off-by: Peng Fan > Cc: Stefano Babic > Reviewed-by: Stefano Babic > --- > > Changes v2: > none > > arch/arm/cpu/arm1136/mx31/generic.c | 2 +- > arch/arm/include/asm/arch-mx31/sys_proto.h | 2 ++ > 2 files changed, 3 insertions(+), 1 deletion(-) > > diff --git a/arch/arm/cpu/arm1136/mx31/generic.c b/arch/arm/cpu/arm1136/mx31/generic.c > index 060d46b..fe96670 100644 > --- a/arch/arm/cpu/arm1136/mx31/generic.c > +++ b/arch/arm/cpu/arm1136/mx31/generic.c > @@ -175,7 +175,7 @@ u32 get_cpu_rev(void) > > for (i = 0; i < ARRAY_SIZE(mx31_cpu_type); i++) > if (srev == mx31_cpu_type[i].srev) > - return mx31_cpu_type[i].v; > + return mx31_cpu_type[i].v | (MXC_CPU_MX31 << 12); > > return srev | 0x8000; > } > diff --git a/arch/arm/include/asm/arch-mx31/sys_proto.h b/arch/arm/include/asm/arch-mx31/sys_proto.h > index b0dfcba..1626442 100644 > --- a/arch/arm/include/asm/arch-mx31/sys_proto.h > +++ b/arch/arm/include/asm/arch-mx31/sys_proto.h > @@ -8,6 +8,8 @@ > #ifndef _SYS_PROTO_H_ > #define _SYS_PROTO_H_ > > +#include "../arch-imx/cpu.h" > + > struct mxc_weimcs { > u32 upper; > u32 lower; > Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================