From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Thu, 29 Aug 2013 23:02:51 +0200 Subject: [U-Boot] [PATCH 3/5] i.MX6: Add convenience macros cpu_type(rev) and is_cpu_type(cpu) In-Reply-To: <1377799030-32524-1-git-send-email-eric.nelson@boundarydevices.com> References: <1377799030-32524-1-git-send-email-eric.nelson@boundarydevices.com> Message-ID: <521FB6FB.8000801@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 Eric, Am 29/08/2013 19:57, schrieb Eric Nelson: > Signed-off-by: Eric Nelson > --- > arch/arm/include/asm/arch-mx6/sys_proto.h | 7 +++++++ > 1 file changed, 7 insertions(+) > Patch is marked as 3/5 in subject - is it part of a patchset ? > diff --git a/arch/arm/include/asm/arch-mx6/sys_proto.h b/arch/arm/include/asm/arch-mx6/sys_proto.h > index bfdfd29..8c21364 100644 > --- a/arch/arm/include/asm/arch-mx6/sys_proto.h > +++ b/arch/arm/include/asm/arch-mx6/sys_proto.h > @@ -19,6 +19,13 @@ > > #define is_soc_rev(rev) ((get_cpu_rev() & 0xFF) - rev) > u32 get_cpu_rev(void); > + > +/* returns MXC_CPU_ value */ > +#define cpu_type(rev) (((rev) >> 12)&0xff) > + > +/* use with MXC_CPU_ constants */ > +#define is_cpu_type(cpu) (cpu_type(get_cpu_rev()) == cpu) > + > const char *get_imx_type(u32 imxtype); > unsigned imx_ddr_size(void); > > Acked-by: Stefano Babic Best regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel 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 =====================================================================