Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://github.com/at91linux/linux-2.6-at91
Browse files Browse the repository at this point in the history
* '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
  • Loading branch information
Linus Torvalds committed Nov 3, 2009
2 parents 9ddfd92 + d8951ad commit 79051db
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions arch/arm/mach-at91/include/mach/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions arch/avr32/mach-at32ap/include/mach/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,8 @@
#define cpu_is_at91sam9263() (0)
#define cpu_is_at91sam9rl() (0)
#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 */

0 comments on commit 79051db

Please sign in to comment.