Skip to content

Commit d8951ad

Browse files
author
Nicolas Ferre
committed
at91: at91sam9g45 family: identify several chip versions
cpu_is_xxx() macros are identifying generic at91sam9g45 chip. This patch adds the capacity to differentiate Engineering Samples and final lots through the inclusion of at91_cpu_fully_identify() and the related chip IDs with chip version field preserved. Signed-off-by: Nicolas Ferre <[email protected]> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <[email protected]> Acked-by: Hans-Christian Egtvedt <[email protected]>
1 parent 2f5d46d commit d8951ad

File tree

2 files changed

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

2 files changed

+10
-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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,6 @@
3333
#define cpu_is_at91cap9() (0)
3434
#define cpu_is_at91sam9g10() (0)
3535
#define cpu_is_at91sam9g45() (0)
36+
#define cpu_is_at91sam9g45es() (0)
3637

3738
#endif /* __ASM_ARCH_CPU_H */

0 commit comments

Comments
 (0)