diff options
author | Eric Nelson <eric.nelson@boundarydevices.com> | 2013-08-29 10:57:10 -0700 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2013-08-31 18:03:55 +0200 |
commit | 1ca244ded50de4b5f39ded2793a02fe5f17f9ba6 (patch) | |
tree | 3cc766266ceb13c916e73f07d5f79d242b16827b /arch | |
parent | 6f6059e0f102809bcba1ea3b7d500c3e4f5f9581 (diff) | |
download | u-boot-imx-1ca244ded50de4b5f39ded2793a02fe5f17f9ba6.zip u-boot-imx-1ca244ded50de4b5f39ded2793a02fe5f17f9ba6.tar.gz u-boot-imx-1ca244ded50de4b5f39ded2793a02fe5f17f9ba6.tar.bz2 |
i.MX6: Add convenience macros cpu_type(rev) and is_cpu_type(cpu)
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/include/asm/arch-mx6/sys_proto.h | 7 |
1 files changed, 7 insertions, 0 deletions
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); |