[U-Boot] [PATCH V3 1/5] i.MX5x: define cpu_type() to return processor portion of cpu rev.

Marek Vasut marex at denx.de
Sun Nov 17 20:24:39 CET 2013


Hi Eric,

> Signed-off-by: Eric Nelson <eric.nelson at boundarydevices.com>
> ---
> 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


More information about the U-Boot mailing list