diff options
Diffstat (limited to 'include/asm-arm/arch-at91rm9200/system.h')
-rw-r--r-- | include/asm-arm/arch-at91rm9200/system.h | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/include/asm-arm/arch-at91rm9200/system.h b/include/asm-arm/arch-at91rm9200/system.h index 8a2ff472e4cf..9c67130603b2 100644 --- a/include/asm-arm/arch-at91rm9200/system.h +++ b/include/asm-arm/arch-at91rm9200/system.h | |||
@@ -22,6 +22,8 @@ | |||
22 | #define __ASM_ARCH_SYSTEM_H | 22 | #define __ASM_ARCH_SYSTEM_H |
23 | 23 | ||
24 | #include <asm/hardware.h> | 24 | #include <asm/hardware.h> |
25 | #include <asm/arch/at91_st.h> | ||
26 | #include <asm/arch/at91_dbgu.h> | ||
25 | 27 | ||
26 | static inline void arch_idle(void) | 28 | static inline void arch_idle(void) |
27 | { | 29 | { |
@@ -39,21 +41,13 @@ static inline void arch_idle(void) | |||
39 | cpu_do_idle(); | 41 | cpu_do_idle(); |
40 | } | 42 | } |
41 | 43 | ||
42 | static inline void arch_reset(char mode) | 44 | void (*at91_arch_reset)(void); |
43 | { | ||
44 | /* | ||
45 | * Perform a hardware reset with the use of the Watchdog timer. | ||
46 | */ | ||
47 | at91_sys_write(AT91_ST_WDMR, AT91_ST_RSTEN | AT91_ST_EXTEN | 1); | ||
48 | at91_sys_write(AT91_ST_CR, AT91_ST_WDRST); | ||
49 | } | ||
50 | |||
51 | #define ARCH_ID_AT91RM9200 0x09200080 | ||
52 | #define ARCH_ID_AT91SAM9261 0x019000a0 | ||
53 | 45 | ||
54 | static inline unsigned long arch_identify(void) | 46 | static inline void arch_reset(char mode) |
55 | { | 47 | { |
56 | return at91_sys_read(AT91_DBGU_CIDR) & (AT91_CIDR_EPROC | AT91_CIDR_ARCH); | 48 | /* call the CPU-specific reset function */ |
49 | if (at91_arch_reset) | ||
50 | (at91_arch_reset)(); | ||
57 | } | 51 | } |
58 | 52 | ||
59 | #endif | 53 | #endif |