public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 01/13] imx: arch-mx6: add is_soc_type helper macro
@ 2015-09-02 18:54 Adrian Alonso
  2015-09-02 18:54 ` [U-Boot] [PATCH v2 02/13] thermal: imx_thermal: rework driver to be reused Adrian Alonso
                   ` (12 more replies)
  0 siblings, 13 replies; 25+ messages in thread
From: Adrian Alonso @ 2015-09-02 18:54 UTC (permalink / raw)
  To: u-boot

Add helper macro is_soc_type to identify iMX SoC family

Signed-off-by: Adrian Alonso <aalonso@freescale.com>
---
Changes for V2: Rework for common sys_proto header file
Changes for V3: Rework for latest master

 arch/arm/include/asm/arch-imx/cpu.h         | 2 ++
 arch/arm/include/asm/imx-common/sys_proto.h | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/arch/arm/include/asm/arch-imx/cpu.h b/arch/arm/include/asm/arch-imx/cpu.h
index 1c8d24e..416905a 100644
--- a/arch/arm/include/asm/arch-imx/cpu.h
+++ b/arch/arm/include/asm/arch-imx/cpu.h
@@ -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
diff --git a/arch/arm/include/asm/imx-common/sys_proto.h b/arch/arm/include/asm/imx-common/sys_proto.h
index 6954ee9..250f3f4 100644
--- a/arch/arm/include/asm/imx-common/sys_proto.h
+++ b/arch/arm/include/asm/imx-common/sys_proto.h
@@ -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))
 
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2015-09-13  8:17 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-02 18:54 [U-Boot] [PATCH v2 01/13] imx: arch-mx6: add is_soc_type helper macro Adrian Alonso
2015-09-02 18:54 ` [U-Boot] [PATCH v2 02/13] thermal: imx_thermal: rework driver to be reused Adrian Alonso
2015-09-13  8:14   ` Stefano Babic
2015-09-02 18:54 ` [U-Boot] [PATCH v2 03/13] arm: imx: common rework cache settings for imx6 Adrian Alonso
2015-09-13  8:14   ` Stefano Babic
2015-09-02 18:54 ` [U-Boot] [PATCH v2 04/13] arm: imx: imx-common: init: move arch init common setup Adrian Alonso
2015-09-13  8:14   ` Stefano Babic
2015-09-02 18:54 ` [U-Boot] [PATCH v2 05/13] imx: system counter driver for imx7d and mx6ul Adrian Alonso
2015-09-13  8:15   ` Stefano Babic
2015-09-02 18:54 ` [U-Boot] [PATCH v2 06/13] imx: imx7d: initial arch level support Adrian Alonso
2015-09-13  8:15   ` Stefano Babic
2015-09-02 18:54 ` [U-Boot] [PATCH v2 07/13] imx: imx7d: clock control module support Adrian Alonso
2015-09-13  8:16   ` Stefano Babic
2015-09-02 18:54 ` [U-Boot] [PATCH v2 08/13] imx: imx7d: Add SoC system support Adrian Alonso
2015-09-13  8:16   ` Stefano Babic
2015-09-02 18:54 ` [U-Boot] [PATCH v2 09/13] arm: imx-common: init: extend init_aips to support imx7 Adrian Alonso
2015-09-13  8:16   ` Stefano Babic
2015-09-02 18:54 ` [U-Boot] [PATCH v2 10/13] arm: imx-common: init: rework wdog settings for imx6/imx7 Adrian Alonso
2015-09-13  8:17   ` Stefano Babic
2015-09-02 18:54 ` [U-Boot] [PATCH v2 11/13] thermal: imx: add imx7d soc thermal support Adrian Alonso
2015-09-13  8:17   ` Stefano Babic
2015-09-02 18:54 ` [U-Boot] [PATCH v2 12/13] imx: imx7d: add imx-common cpu support for imx7d Adrian Alonso
2015-09-13  8:17   ` Stefano Babic
2015-09-02 18:54 ` [U-Boot] [PATCH v2 13/13] imx: mx7dsabresd: Add support for MX7D SABRESD board Adrian Alonso
2015-09-13  8:13 ` [U-Boot] [PATCH v2 01/13] imx: arch-mx6: add is_soc_type helper macro Stefano Babic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox