1
2#ifndef __ASM_MACH_CPUTYPE_H
3#define __ASM_MACH_CPUTYPE_H
4
5#include <asm/cputype.h>
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23extern unsigned int mmp_chip_id;
24
25#ifdef CONFIG_CPU_PXA168
26static inline int cpu_is_pxa168(void)
27{
28 return (((read_cpuid_id() >> 8) & 0xff) == 0x84) &&
29 ((mmp_chip_id & 0xfff) == 0x168);
30}
31#else
32#define cpu_is_pxa168() (0)
33#endif
34
35
36#ifdef CONFIG_CPU_PXA910
37static inline int cpu_is_pxa910(void)
38{
39 return (((read_cpuid_id() >> 8) & 0xff) == 0x84) &&
40 (((mmp_chip_id & 0xfff) == 0x910) ||
41 ((mmp_chip_id & 0xfff) == 0x920));
42}
43#else
44#define cpu_is_pxa910() (0)
45#endif
46
47#ifdef CONFIG_CPU_MMP2
48static inline int cpu_is_mmp2(void)
49{
50 return (((read_cpuid_id() >> 8) & 0xff) == 0x58);
51}
52#else
53#define cpu_is_mmp2() (0)
54#endif
55
56#endif
57