From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Tue, 1 Sep 2015 09:28:40 +0200 Subject: [U-Boot] [PATCH] imx: vf610 add function get_cpu_rev In-Reply-To: <1441071615-21903-1-git-send-email-Peng.Fan@freescale.com> References: <1441071615-21903-1-git-send-email-Peng.Fan@freescale.com> Message-ID: <55E553A8.5060400@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 Hi Peng, On 01/09/2015 03:40, Peng Fan wrote: > Since we need to support runtime check for different drivers, > we need to add get_cpu_rev for vf610. > > This patch only introduce a empty implementation to avoid build errors, > later more stuff can be added if need to check vf610 cpu types. > > Signed-off-by: Peng Fan > Cc: Stefano Babic > --- > arch/arm/cpu/armv7/vf610/generic.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/arch/arm/cpu/armv7/vf610/generic.c b/arch/arm/cpu/armv7/vf610/generic.c > index 05c401d..bd948cb 100644 > --- a/arch/arm/cpu/armv7/vf610/generic.c > +++ b/arch/arm/cpu/armv7/vf610/generic.c > @@ -266,6 +266,17 @@ void imx_get_mac_from_fuse(int dev_id, unsigned char *mac) > } > #endif > > +/* > + * Empty function > + * Several drivers use runtime check, which needs get_cpu_rev. > + * If later we need to do runtime check for vf610, we can add > + * more stuff here. > + */ > +u32 get_cpu_rev(void) > +{ > + return 0; > +} > + > #if defined(CONFIG_DISPLAY_CPUINFO) > static char *get_reset_cause(void) > { > If there is really no way to get the cpu revision from the SOC, I suggest we use the same approach of MXC_CPU_MX6SOLO with a "dummy" cpu. Something like : #define MXC_CPU_VF610 0xF6 /* dummy CPU */ "F6" from vF610, of course, instead of returning 0. 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 =====================================================================