* [PATCH] at91: at91sam9g45 family: identify several chip versions
@ 2009-09-21 10:40 Nicolas Ferre
2009-09-21 11:41 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Ferre @ 2009-09-21 10:40 UTC (permalink / raw)
To: linux-arm-kernel
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>
---
arch/arm/mach-at91/include/mach/cpu.h | 9 +++++++++
arch/avr32/mach-at32ap/include/mach/cpu.h | 1 +
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-at91/include/mach/cpu.h b/arch/arm/mach-at91/include/mach/cpu.h
index 6d8c1b9..5a06501 100644
--- a/arch/arm/mach-at91/include/mach/cpu.h
+++ b/arch/arm/mach-at91/include/mach/cpu.h
@@ -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
@@ -43,6 +45,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
@@ -120,8 +127,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
diff --git a/arch/avr32/mach-at32ap/include/mach/cpu.h b/arch/avr32/mach-at32ap/include/mach/cpu.h
index c253e9b..9c96a13 100644
--- a/arch/avr32/mach-at32ap/include/mach/cpu.h
+++ b/arch/avr32/mach-at32ap/include/mach/cpu.h
@@ -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 */
--
1.5.6.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] at91: at91sam9g45 family: identify several chip versions
2009-09-21 10:40 [PATCH] at91: at91sam9g45 family: identify several chip versions Nicolas Ferre
@ 2009-09-21 11:41 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 0 replies; 2+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-09-21 11:41 UTC (permalink / raw)
To: linux-arm-kernel
On 12:40 Mon 21 Sep , Nicolas Ferre wrote:
> 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>
> ---
> arch/arm/mach-at91/include/mach/cpu.h | 9 +++++++++
> arch/avr32/mach-at32ap/include/mach/cpu.h | 1 +
> 2 files changed, 10 insertions(+), 0 deletions(-)
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Best Regards,
J.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-09-21 11:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-21 10:40 [PATCH] at91: at91sam9g45 family: identify several chip versions Nicolas Ferre
2009-09-21 11:41 ` Jean-Christophe PLAGNIOL-VILLARD
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).