From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Sun, 17 Nov 2013 20:24:39 +0100 Subject: [U-Boot] [PATCH V3 1/5] i.MX5x: define cpu_type() to return processor portion of cpu rev. In-Reply-To: <1384708667-22489-2-git-send-email-eric.nelson@boundarydevices.com> References: <1384708667-22489-1-git-send-email-eric.nelson@boundarydevices.com> <1384708667-22489-2-git-send-email-eric.nelson@boundarydevices.com> Message-ID: <201311172024.39861.marex@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, > Signed-off-by: Eric Nelson > --- > This patch is new in V3 > > arch/arm/include/asm/arch-mx5/sys_proto.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/arm/include/asm/arch-mx5/sys_proto.h > b/arch/arm/include/asm/arch-mx5/sys_proto.h index 9949ad1..9dad5fc 100644 > --- a/arch/arm/include/asm/arch-mx5/sys_proto.h > +++ b/arch/arm/include/asm/arch-mx5/sys_proto.h > @@ -17,6 +17,10 @@ > > #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) Maybe you can implement it the same way as get_cpu_rev() and make it call get_cpu_rev() internally ? Then it'd be a function (with all the typechecking and stuff) and you won't need to pass extra param. Best regards, Marek Vasut