diff options
author | Mike Frysinger <michael.frysinger@analog.com> | 2007-05-21 06:09:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-21 12:50:23 -0400 |
commit | a9c59c2746c7e773839d51027c0e16ccf41f8fef (patch) | |
tree | e5eef75538858cc0d6f70036c549b2e3cc4858fc | |
parent | 19381f024b01413d83cec1655c3fc4c9c09ae274 (diff) |
Blackfin arch: cache SWRST value at bootup so other things like watchdog can non-destructively query it
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/blackfin/kernel/setup.c | 8 | ||||
-rw-r--r-- | include/asm-blackfin/bfin-global.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index b6ac6f8067b8..02dc74301920 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c | |||
@@ -43,6 +43,8 @@ | |||
43 | #include <asm/blackfin.h> | 43 | #include <asm/blackfin.h> |
44 | #include <asm/cplbinit.h> | 44 | #include <asm/cplbinit.h> |
45 | 45 | ||
46 | u16 _bfin_swrst; | ||
47 | |||
46 | unsigned long memory_start, memory_end, physical_mem_end; | 48 | unsigned long memory_start, memory_end, physical_mem_end; |
47 | unsigned long reserved_mem_dcache_on; | 49 | unsigned long reserved_mem_dcache_on; |
48 | unsigned long reserved_mem_icache_on; | 50 | unsigned long reserved_mem_icache_on; |
@@ -381,6 +383,12 @@ void __init setup_arch(char **cmdline_p) | |||
381 | if (l1_length > L1_DATA_A_LENGTH) | 383 | if (l1_length > L1_DATA_A_LENGTH) |
382 | panic("L1 memory overflow\n"); | 384 | panic("L1 memory overflow\n"); |
383 | 385 | ||
386 | #ifdef BF561_FAMILY | ||
387 | _bfin_swrst = bfin_read_SICA_SWRST(); | ||
388 | #else | ||
389 | _bfin_swrst = bfin_read_SWRST(); | ||
390 | #endif | ||
391 | |||
384 | bf53x_cache_init(); | 392 | bf53x_cache_init(); |
385 | 393 | ||
386 | printk(KERN_INFO "Hardware Trace Enabled\n"); | 394 | printk(KERN_INFO "Hardware Trace Enabled\n"); |
diff --git a/include/asm-blackfin/bfin-global.h b/include/asm-blackfin/bfin-global.h index e37f81609fc3..57f37ccdcdf1 100644 --- a/include/asm-blackfin/bfin-global.h +++ b/include/asm-blackfin/bfin-global.h | |||
@@ -104,6 +104,7 @@ extern unsigned long dpdt_swapcount_table[]; | |||
104 | 104 | ||
105 | extern unsigned long table_start, table_end; | 105 | extern unsigned long table_start, table_end; |
106 | 106 | ||
107 | extern u16 _bfin_swrst; /* shadow for Software Reset Register (SWRST) */ | ||
107 | extern struct file_operations dpmc_fops; | 108 | extern struct file_operations dpmc_fops; |
108 | extern char _start; | 109 | extern char _start; |
109 | extern unsigned long _ramstart, _ramend, _rambase; | 110 | extern unsigned long _ramstart, _ramend, _rambase; |