mirror of
https://github.com/torvalds/linux.git
synced 2024-12-24 11:51:27 +00:00
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 <nicolas.ferre@atmel.com> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
This commit is contained in:
parent
2f5d46d2f6
commit
d8951adeba
@ -25,6 +25,8 @@
|
||||
#define ARCH_ID_AT91SAM9G20 0x019905a0
|
||||
#define ARCH_ID_AT91SAM9RL64 0x019b03a0
|
||||
#define ARCH_ID_AT91SAM9G45 0x819b05a0
|
||||
#define ARCH_ID_AT91SAM9G45MRL 0x819b05a2 /* aka 9G45-ES2 & non ES lots */
|
||||
#define ARCH_ID_AT91SAM9G45ES 0x819b05a1 /* 9G45-ES (Engineering Sample) */
|
||||
#define ARCH_ID_AT91CAP9 0x039A03A0
|
||||
|
||||
#define ARCH_ID_AT91SAM9XE128 0x329973a0
|
||||
@ -41,6 +43,11 @@ static inline unsigned long at91_cpu_identify(void)
|
||||
return (at91_sys_read(AT91_DBGU_CIDR) & ~AT91_CIDR_VERSION);
|
||||
}
|
||||
|
||||
static inline unsigned long at91_cpu_fully_identify(void)
|
||||
{
|
||||
return at91_sys_read(AT91_DBGU_CIDR);
|
||||
}
|
||||
|
||||
#define ARCH_EXID_AT91SAM9M11 0x00000001
|
||||
#define ARCH_EXID_AT91SAM9M10 0x00000002
|
||||
#define ARCH_EXID_AT91SAM9G45 0x00000004
|
||||
@ -118,8 +125,10 @@ static inline unsigned long at91cap9_rev_identify(void)
|
||||
|
||||
#ifdef CONFIG_ARCH_AT91SAM9G45
|
||||
#define cpu_is_at91sam9g45() (at91_cpu_identify() == ARCH_ID_AT91SAM9G45)
|
||||
#define cpu_is_at91sam9g45es() (at91_cpu_fully_identify() == ARCH_ID_AT91SAM9G45ES)
|
||||
#else
|
||||
#define cpu_is_at91sam9g45() (0)
|
||||
#define cpu_is_at91sam9g45es() (0)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_AT91CAP9
|
||||
|
@ -33,5 +33,6 @@
|
||||
#define cpu_is_at91cap9() (0)
|
||||
#define cpu_is_at91sam9g10() (0)
|
||||
#define cpu_is_at91sam9g45() (0)
|
||||
#define cpu_is_at91sam9g45es() (0)
|
||||
|
||||
#endif /* __ASM_ARCH_CPU_H */
|
||||
|
Loading…
Reference in New Issue
Block a user