Skip to contentSkip to conversation

i.MX6: Add convenience macros cpu_type(rev) and is_cpu_type(cpu)

PATCH New Eric Nelson 2 participants 5 messages Aug 29, 2013 – Aug 31, 2013 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 3/5 i.MX6: Add convenience macros cpu_type(rev) and is_cpu_type(cpu)

---
 arch/arm/include/asm/arch-mx6/sys_proto.h | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/include/asm/arch-mx6/sys_proto.h +7 -0
index bfdfd29..8c21364 100644
@@ -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);
 
Signature · 1 line
1.8.1.2
#1 lore raw

PATCH 3/5 i.MX6: Add convenience macros cpu_type(rev) and is_cpu_type(cpu)

Hi Eric,

Am 29/08/2013 19:57, schrieb Eric Nelson:

Quoted 5 lines
---
 arch/arm/include/asm/arch-mx6/sys_proto.h | 7 +++++++
 1 file changed, 7 insertions(+)

Patch is marked as 3/5 in subject - is it part of a patchset ?

Quoted 9 lines
arch/arm/include/asm/arch-mx6/sys_proto.h +0 -0
index bfdfd29..8c21364 100644
@@ -19,6 +19,13 @@
 
 #define is_soc_rev(rev)	((get_cpu_rev() & 0xFF) - rev)
 u32 get_cpu_rev(void);

arch/arm/include/asm/arch-mx6/sys_proto.h line 31

Quoted 10 lines
arch/arm/include/asm/arch-mx6/sys_proto.h +7 -0
+
+/* 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);
 

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#2 lore raw

PATCH 3/5 i.MX6: Add convenience macros cpu_type(rev) and is_cpu_type(cpu)

Hi Stefano,

Quoted 11 lines · Stefano Babic

Hi Eric,

Am 29/08/2013 19:57, schrieb Eric Nelson:

Quoted 5 lines
---
  arch/arm/include/asm/arch-mx6/sys_proto.h | 7 +++++++
  1 file changed, 7 insertions(+)

Patch is marked as 3/5 in subject - is it part of a patchset ?

No. I'm just patch-challenged today.

I also forwarded a cover letter for the two patches changing the ANATOP_PFD macros without proper heading.

Let me know if you'd like me to re-send.

#3 lore raw

PATCH 3/5 i.MX6: Add convenience macros cpu_type(rev) and is_cpu_type(cpu)

Quoted 12 lines · Eric Nelson

Hi Stefano,

Quoted 9 lines · Stefano Babic

Hi Eric,

Am 29/08/2013 19:57, schrieb Eric Nelson:

Quoted 5 lines
---
  arch/arm/include/asm/arch-mx6/sys_proto.h | 7 +++++++
  1 file changed, 7 insertions(+)
Quoted 5 lines
Quoted 2 lines

Patch is marked as 3/5 in subject - is it part of a patchset ?

No. I'm just patch-challenged today.

;-)

Quoted 5 lines

I also forwarded a cover letter for the two patches changing the ANATOP_PFD macros without proper heading.

Let me know if you'd like me to re-send.

No problem, you do not need to resend it.

Regards,
Stefano

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#4 lore raw

PATCH 3/5 i.MX6: Add convenience macros cpu_type(rev) and is_cpu_type(cpu)

In reply to Eric Nelson
Quoted 2 lines · Eric Nelson

---

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================