All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: add cpu_is_pj4() to distinguish PJ4 core
@ 2014-03-21  7:01 Chao Xie
  2014-03-21  7:01 ` [PATCH 2/2] ARM: PJ4: check cpu id for PJ4 cp0 access Chao Xie
                   ` (5 more replies)
  0 siblings, 6 replies; 28+ messages in thread
From: Chao Xie @ 2014-03-21  7:01 UTC (permalink / raw)
  To: linux-arm-kernel

PJ4 is based on V7, but it has some changes. For example, some
coprocessor settings.

Signed-off-by: Chao Xie <chao.xie@marvell.com>
---
 arch/arm/include/asm/cputype.h | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h
index 42f0889..c651e3b 100644
--- a/arch/arm/include/asm/cputype.h
+++ b/arch/arm/include/asm/cputype.h
@@ -221,4 +221,23 @@ static inline int cpu_is_xsc3(void)
 #define	cpu_is_xscale()	1
 #endif
 
+/*
+ * Marvell's PJ4 core is based on V7 version. It has some modification
+ * for coprocessor setting. For this reason, we need a way to distinguish
+ * it.
+ */
+#ifndef CONFIG_CPU_PJ4
+#define cpu_is_pj4()	0
+#else
+static inline int cpu_is_pj4(void)
+{
+	unsigned int id;
+
+	id = read_cpuid_id();
+	if ((id & 0xfffffff0) == 0x562f5840)
+		return 1;
+
+	return 0;
+}
+#endif
 #endif
-- 
1.8.3.2

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

end of thread, other threads:[~2014-04-22 16:03 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-21  7:01 [PATCH 1/2] ARM: add cpu_is_pj4() to distinguish PJ4 core Chao Xie
2014-03-21  7:01 ` [PATCH 2/2] ARM: PJ4: check cpu id for PJ4 cp0 access Chao Xie
2014-03-21 18:52 ` [PATCH 1/2] ARM: add cpu_is_pj4() to distinguish PJ4 core Stephen Warren
2014-03-24 18:58 ` Kevin Hilman
2014-03-24 19:38 ` Matt Porter
2014-04-01 20:18 ` Stephen Warren
2014-04-02 23:26   ` Kevin Hilman
2014-04-14 13:12 ` Thomas Petazzoni
2014-04-14 13:43   ` Russell King - ARM Linux
2014-04-14 15:27     ` Arnd Bergmann
2014-04-15 18:15   ` [PATCH 0/5] fixing regressions caused by Dove in MULTI_V7 Sebastian Hesselbarth
2014-04-15 18:15     ` Sebastian Hesselbarth
2014-04-15 18:15     ` [PATCH 1/5] ARM: iwmmxt: explicitly check for supported architectures Sebastian Hesselbarth
2014-04-15 18:15       ` Sebastian Hesselbarth
2014-04-15 18:16     ` [PATCH 2/5] ARM: pj4: enable iWMMXt only if CONFIG_IWMMXT is set Sebastian Hesselbarth
2014-04-15 18:16       ` Sebastian Hesselbarth
2014-04-15 18:16     ` [PATCH 3/5] ARM: pj4: properly detect existence of iWMMXt coprocessor Sebastian Hesselbarth
2014-04-15 18:16       ` Sebastian Hesselbarth
2014-04-15 18:16     ` [PATCH 4/5] ARM: pj4: fix cpu_is_pj4 check Sebastian Hesselbarth
2014-04-15 18:16       ` Sebastian Hesselbarth
2014-04-15 18:16     ` [PATCH 5/5] ARM: iwmmxt: allow to build iWMMXt on Marvell PJ4B Sebastian Hesselbarth
2014-04-15 18:16       ` Sebastian Hesselbarth
2014-04-16  8:44     ` [PATCH 0/5] fixing regressions caused by Dove in MULTI_V7 Thomas Petazzoni
2014-04-16  8:44       ` Thomas Petazzoni
2014-04-21 18:30     ` Thomas Petazzoni
2014-04-21 18:30       ` Thomas Petazzoni
2014-04-22 16:03     ` Kevin Hilman
2014-04-22 16:03       ` Kevin Hilman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.