aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorChao Xie Linux <xiechao.mail@gmail.com>2014-04-01 21:47:09 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2014-04-08 12:55:27 -0400
commitfdb487f5c961b94486a78fa61fa28b8eff1954ab (patch)
treed410f30c369db2898f28cca587e789ddba45f385 /arch/arm
parent779dd9590b00bd91b7811c24f0df34a9d91bfa0f (diff)
ARM: 8015/1: Add cpu_is_pj4 to distinguish PJ4 because it has some differences with V7
The patch add cpu_is_pj4 at arch/arm/include/asm/cputype.h PJ4 has some differences with V7, for example the coprocessor. To disinguish this kind of situation. cpu_is_pj4 is needed. Signed-off-by: Chao Xie <chao.xie@marvell.com> Reviewed-by: Kevin Hilman <khilman@linaro.org> Tested-by: Kevin Hilman <khilman@linaro.org> Tested-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Tested-by: Matt Porter <mporter@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/include/asm/cputype.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h
index 42f0889f0584..c651e3b26ec7 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)
221#define cpu_is_xscale() 1 221#define cpu_is_xscale() 1
222#endif 222#endif
223 223
224/*
225 * Marvell's PJ4 core is based on V7 version. It has some modification
226 * for coprocessor setting. For this reason, we need a way to distinguish
227 * it.
228 */
229#ifndef CONFIG_CPU_PJ4
230#define cpu_is_pj4() 0
231#else
232static inline int cpu_is_pj4(void)
233{
234 unsigned int id;
235
236 id = read_cpuid_id();
237 if ((id & 0xfffffff0) == 0x562f5840)
238 return 1;
239
240 return 0;
241}
242#endif
224#endif 243#endif