Skip to content

Commit 79051db

Browse files
committed
Merge branch 'for-linus' of git://github.com/at91linux/linux-2.6-at91
* 'for-linus' of git://github.com/at91linux/linux-2.6-at91: at91: at91sam9g45 family: identify several chip versions avr32: add two new at91 to cpu.h definition
2 parents 9ddfd92 + d8951ad commit 79051db

File tree

2 files changed

+12
-0
lines changed
  • arch
    • arm/mach-at91/include/mach
    • avr32/mach-at32ap/include/mach

2 files changed

+12
-0
lines changed

arch/arm/mach-at91/include/mach/cpu.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
#define ARCH_ID_AT91SAM9G20 0x019905a0
2626
#define ARCH_ID_AT91SAM9RL64 0x019b03a0
2727
#define ARCH_ID_AT91SAM9G45 0x819b05a0
28+
#define ARCH_ID_AT91SAM9G45MRL 0x819b05a2 /* aka 9G45-ES2 & non ES lots */
29+
#define ARCH_ID_AT91SAM9G45ES 0x819b05a1 /* 9G45-ES (Engineering Sample) */
2830
#define ARCH_ID_AT91CAP9 0x039A03A0
2931

3032
#define ARCH_ID_AT91SAM9XE128 0x329973a0
@@ -41,6 +43,11 @@ static inline unsigned long at91_cpu_identify(void)
4143
return (at91_sys_read(AT91_DBGU_CIDR) & ~AT91_CIDR_VERSION);
4244
}
4345

46+
static inline unsigned long at91_cpu_fully_identify(void)
47+
{
48+
return at91_sys_read(AT91_DBGU_CIDR);
49+
}
50+
4451
#define ARCH_EXID_AT91SAM9M11 0x00000001
4552
#define ARCH_EXID_AT91SAM9M10 0x00000002
4653
#define ARCH_EXID_AT91SAM9G45 0x00000004
@@ -118,8 +125,10 @@ static inline unsigned long at91cap9_rev_identify(void)
118125

119126
#ifdef CONFIG_ARCH_AT91SAM9G45
120127
#define cpu_is_at91sam9g45() (at91_cpu_identify() == ARCH_ID_AT91SAM9G45)
128+
#define cpu_is_at91sam9g45es() (at91_cpu_fully_identify() == ARCH_ID_AT91SAM9G45ES)
121129
#else
122130
#define cpu_is_at91sam9g45() (0)
131+
#define cpu_is_at91sam9g45es() (0)
123132
#endif
124133

125134
#ifdef CONFIG_ARCH_AT91CAP9

arch/avr32/mach-at32ap/include/mach/cpu.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,8 @@
3131
#define cpu_is_at91sam9263() (0)
3232
#define cpu_is_at91sam9rl() (0)
3333
#define cpu_is_at91cap9() (0)
34+
#define cpu_is_at91sam9g10() (0)
35+
#define cpu_is_at91sam9g45() (0)
36+
#define cpu_is_at91sam9g45es() (0)
3437

3538
#endif /* __ASM_ARCH_CPU_H */

0 commit comments

Comments
 (0)