mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-18 06:58:54 +00:00
imx: arch-mx6: add is_soc_type helper macro
Add helper macro is_soc_type to identify iMX SoC family Signed-off-by: Adrian Alonso <aalonso@freescale.com>
This commit is contained in:
parent
922f735ecf
commit
15c52b3ddd
2 changed files with 5 additions and 0 deletions
|
@ -23,6 +23,8 @@
|
|||
#define MXC_CPU_MX6QP 0x69
|
||||
#define MXC_CPU_VF610 0xF6 /* dummy ID */
|
||||
|
||||
#define MXC_SOC_MX6 0x60
|
||||
|
||||
#define CS0_128 0
|
||||
#define CS0_64M_CS1_64M 1
|
||||
#define CS0_64M_CS1_32M_CS2_32M 2
|
||||
|
|
|
@ -17,9 +17,12 @@
|
|||
|
||||
/* returns MXC_CPU_ value */
|
||||
#define cpu_type(rev) (((rev) >> 12) & 0xff)
|
||||
#define soc_type(rev) (((rev) >> 12) & 0xf0)
|
||||
/* both macros return/take MXC_CPU_ constants */
|
||||
#define get_cpu_type() (cpu_type(get_cpu_rev()))
|
||||
#define get_soc_type() (soc_type(get_cpu_rev()))
|
||||
#define is_cpu_type(cpu) (get_cpu_type() == cpu)
|
||||
#define is_soc_type(soc) (get_soc_type() == soc)
|
||||
|
||||
#define is_mx6dqp() (is_cpu_type(MXC_CPU_MX6QP) || is_cpu_type(MXC_CPU_MX6DP))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue