From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peng Fan Date: Thu, 13 Aug 2015 08:24:21 +0800 Subject: [U-Boot] [PATCH] imx: mx27 implement get_cpu_rev In-Reply-To: <55CB6B4C.3080401@denx.de> References: <1439372418-7296-1-git-send-email-Peng.Fan@freescale.com> <55CB6B4C.3080401@denx.de> Message-ID: <20150813002419.GA25619@shlinux2> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Stefano, On Wed, Aug 12, 2015 at 05:50:36PM +0200, Stefano Babic wrote: >On 12/08/2015 11:40, Peng Fan wrote: >> Write a function named get_cpu_rev to make it support >> runtime checking using "is_cpu_type(MXC_CPU_xx)". >> >> Also introduce a macro MXC_CPU_MX27 with value 0x27. >> >> Signed-off-by: Peng Fan >> Cc: Stefano Babic >> --- >> >> Note: >> Based on https://patchwork.ozlabs.org/patch/505618/ to support runtime >> check patch. >> >> arch/arm/cpu/arm926ejs/mx27/generic.c | 6 ++++++ >> arch/arm/include/asm/arch-imx/cpu.h | 1 + >> 2 files changed, 7 insertions(+) >> >> diff --git a/arch/arm/cpu/arm926ejs/mx27/generic.c b/arch/arm/cpu/arm926ejs/mx27/generic.c >> index 5ee9f07..b713c84 100644 >> --- a/arch/arm/cpu/arm926ejs/mx27/generic.c >> +++ b/arch/arm/cpu/arm926ejs/mx27/generic.c >> @@ -12,6 +12,7 @@ >> #include >> #include >> #include >> +#include >> #ifdef CONFIG_MXC_MMC >> #include >> #endif >> @@ -159,6 +160,11 @@ unsigned int mxc_get_clock(enum mxc_clock clk) >> } >> >> >> +u32 get_cpu_rev(void) >> +{ >> + return MXC_CPU_MX27 << 12; >> +} >> + >> #if defined(CONFIG_DISPLAY_CPUINFO) >> int print_cpuinfo (void) >> { >> diff --git a/arch/arm/include/asm/arch-imx/cpu.h b/arch/arm/include/asm/arch-imx/cpu.h >> index 71208aa..be13b96 100644 >> --- a/arch/arm/include/asm/arch-imx/cpu.h >> +++ b/arch/arm/include/asm/arch-imx/cpu.h >> @@ -6,6 +6,7 @@ >> >> #define MXC_CPU_MX23 0x23 >> #define MXC_CPU_MX25 0x25 >> +#define MXC_CPU_MX27 0x27 >> #define MXC_CPU_MX28 0x28 >> #define MXC_CPU_MX31 0x31 >> #define MXC_CPU_MX35 0x35 >> > >Reviewed-by: Stefano Babic > >Peng, because a repost for your MX2/MX3 series is needed, can you add >this one to that series ? Thanks ! Ok. I'll repost this one to that series. Regards, Peng. > >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 >===================================================================== --