aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/include/mach/cpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-at91/include/mach/cpu.h')
-rw-r--r--arch/arm/mach-at91/include/mach/cpu.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/include/mach/cpu.h b/arch/arm/mach-at91/include/mach/cpu.h
index c554c3e4d553..34a9502c48bc 100644
--- a/arch/arm/mach-at91/include/mach/cpu.h
+++ b/arch/arm/mach-at91/include/mach/cpu.h
@@ -21,8 +21,10 @@
21#define ARCH_ID_AT91SAM9260 0x019803a0 21#define ARCH_ID_AT91SAM9260 0x019803a0
22#define ARCH_ID_AT91SAM9261 0x019703a0 22#define ARCH_ID_AT91SAM9261 0x019703a0
23#define ARCH_ID_AT91SAM9263 0x019607a0 23#define ARCH_ID_AT91SAM9263 0x019607a0
24#define ARCH_ID_AT91SAM9G10 0x819903a0
24#define ARCH_ID_AT91SAM9G20 0x019905a0 25#define ARCH_ID_AT91SAM9G20 0x019905a0
25#define ARCH_ID_AT91SAM9RL64 0x019b03a0 26#define ARCH_ID_AT91SAM9RL64 0x019b03a0
27#define ARCH_ID_AT91SAM9G45 0x819b05a0
26#define ARCH_ID_AT91CAP9 0x039A03A0 28#define ARCH_ID_AT91CAP9 0x039A03A0
27 29
28#define ARCH_ID_AT91SAM9XE128 0x329973a0 30#define ARCH_ID_AT91SAM9XE128 0x329973a0
@@ -39,6 +41,15 @@ static inline unsigned long at91_cpu_identify(void)
39 return (at91_sys_read(AT91_DBGU_CIDR) & ~AT91_CIDR_VERSION); 41 return (at91_sys_read(AT91_DBGU_CIDR) & ~AT91_CIDR_VERSION);
40} 42}
41 43
44#define ARCH_EXID_AT91SAM9M11 0x00000001
45#define ARCH_EXID_AT91SAM9M10 0x00000002
46#define ARCH_EXID_AT91SAM9G45 0x00000004
47
48static inline unsigned long at91_exid_identify(void)
49{
50 return at91_sys_read(AT91_DBGU_EXID);
51}
52
42 53
43#define ARCH_FAMILY_AT91X92 0x09200000 54#define ARCH_FAMILY_AT91X92 0x09200000
44#define ARCH_FAMILY_AT91SAM9 0x01900000 55#define ARCH_FAMILY_AT91SAM9 0x01900000
@@ -87,6 +98,12 @@ static inline unsigned long at91cap9_rev_identify(void)
87#define cpu_is_at91sam9261() (0) 98#define cpu_is_at91sam9261() (0)
88#endif 99#endif
89 100
101#ifdef CONFIG_ARCH_AT91SAM9G10
102#define cpu_is_at91sam9g10() (at91_cpu_identify() == ARCH_ID_AT91SAM9G10)
103#else
104#define cpu_is_at91sam9g10() (0)
105#endif
106
90#ifdef CONFIG_ARCH_AT91SAM9263 107#ifdef CONFIG_ARCH_AT91SAM9263
91#define cpu_is_at91sam9263() (at91_cpu_identify() == ARCH_ID_AT91SAM9263) 108#define cpu_is_at91sam9263() (at91_cpu_identify() == ARCH_ID_AT91SAM9263)
92#else 109#else
@@ -99,6 +116,12 @@ static inline unsigned long at91cap9_rev_identify(void)
99#define cpu_is_at91sam9rl() (0) 116#define cpu_is_at91sam9rl() (0)
100#endif 117#endif
101 118
119#ifdef CONFIG_ARCH_AT91SAM9G45
120#define cpu_is_at91sam9g45() (at91_cpu_identify() == ARCH_ID_AT91SAM9G45)
121#else
122#define cpu_is_at91sam9g45() (0)
123#endif
124
102#ifdef CONFIG_ARCH_AT91CAP9 125#ifdef CONFIG_ARCH_AT91CAP9
103#define cpu_is_at91cap9() (at91_cpu_identify() == ARCH_ID_AT91CAP9) 126#define cpu_is_at91cap9() (at91_cpu_identify() == ARCH_ID_AT91CAP9)
104#define cpu_is_at91cap9_revB() (at91cap9_rev_identify() == ARCH_REVISION_CAP9_B) 127#define cpu_is_at91cap9_revB() (at91cap9_rev_identify() == ARCH_REVISION_CAP9_B)