summaryrefslogtreecommitdiffstats
path: root/include/asm-arm/arch-at91/cpu.h
diff options
context:
space:
mode:
authorAndrew Victor <andrew@sanpeople.com>2007-02-15 08:17:38 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-02-15 16:33:31 +0100
commitf7eee89b2a4b4c233acde621005a814da0eb46d6 (patch)
tree25474085888884aab2a2a9338dfb0de327d15475 /include/asm-arm/arch-at91/cpu.h
parent[ARM] 4189/1: AT91: MACB Ethernet clock (diff)
downloadlinux-f7eee89b2a4b4c233acde621005a814da0eb46d6.tar.xz
linux-f7eee89b2a4b4c233acde621005a814da0eb46d6.zip
[ARM] 4192/1: AT91: Support for AT91SAM9XE processors.
Add support for the Atmel AT91SAM9XE range of processors. These are basically AT91SAM9260's with different amounts of internal SRAM and Flash. We make use of the existing AT91SAM9260 support, but just perform run-time detection of the size of the internal SRAM. Original patch from Nicolas Ferre. Signed-off-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm/arch-at91/cpu.h')
-rw-r--r--include/asm-arm/arch-at91/cpu.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/asm-arm/arch-at91/cpu.h b/include/asm-arm/arch-at91/cpu.h
index 9efde0dad249..d464ca58cdbc 100644
--- a/include/asm-arm/arch-at91/cpu.h
+++ b/include/asm-arm/arch-at91/cpu.h
@@ -22,6 +22,9 @@
#define ARCH_ID_AT91SAM9261 0x019703a0
#define ARCH_ID_AT91SAM9263 0x019607a0
+#define ARCH_ID_AT91SAM9XE128 0x329973a0
+#define ARCH_ID_AT91SAM9XE256 0x329a93a0
+#define ARCH_ID_AT91SAM9XE512 0x329aa3a0
static inline unsigned long at91_cpu_identify(void)
{
@@ -29,6 +32,16 @@ static inline unsigned long at91_cpu_identify(void)
}
+#define ARCH_FAMILY_AT91X92 0x09200000
+#define ARCH_FAMILY_AT91SAM9 0x01900000
+#define ARCH_FAMILY_AT91SAM9XE 0x02900000
+
+static inline unsigned long at91_arch_identify(void)
+{
+ return (at91_sys_read(AT91_DBGU_CIDR) & AT91_CIDR_ARCH);
+}
+
+
#ifdef CONFIG_ARCH_AT91RM9200
#define cpu_is_at91rm9200() (at91_cpu_identify() == ARCH_ID_AT91RM9200)
#else
@@ -36,8 +49,10 @@ static inline unsigned long at91_cpu_identify(void)
#endif
#ifdef CONFIG_ARCH_AT91SAM9260
-#define cpu_is_at91sam9260() (at91_cpu_identify() == ARCH_ID_AT91SAM9260)
+#define cpu_is_at91sam9xe() (at91_arch_identify() == ARCH_FAMILY_AT91SAM9XE)
+#define cpu_is_at91sam9260() ((at91_cpu_identify() == ARCH_ID_AT91SAM9260) || cpu_is_at91sam9xe())
#else
+#define cpu_is_at91sam9xe() (0)
#define cpu_is_at91sam9260() (0)
#endif