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