summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorMike Frysinger <michael.frysinger@analog.com>2007-05-21 18:09:32 +0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-21 09:50:23 -0700
commita9c59c2746c7e773839d51027c0e16ccf41f8fef (patch)
treee5eef75538858cc0d6f70036c549b2e3cc4858fc /arch
parent19381f024b01413d83cec1655c3fc4c9c09ae274 (diff)
downloadlwn-a9c59c2746c7e773839d51027c0e16ccf41f8fef.tar.gz
lwn-a9c59c2746c7e773839d51027c0e16ccf41f8fef.zip
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/blackfin/kernel/setup.c8
1 files changed, 8 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 @@
#include <asm/blackfin.h>
#include <asm/cplbinit.h>
+u16 _bfin_swrst;
+
unsigned long memory_start, memory_end, physical_mem_end;
unsigned long reserved_mem_dcache_on;
unsigned long reserved_mem_icache_on;
@@ -381,6 +383,12 @@ void __init setup_arch(char **cmdline_p)
if (l1_length > L1_DATA_A_LENGTH)
panic("L1 memory overflow\n");
+#ifdef BF561_FAMILY
+ _bfin_swrst = bfin_read_SICA_SWRST();
+#else
+ _bfin_swrst = bfin_read_SWRST();
+#endif
+
bf53x_cache_init();
printk(KERN_INFO "Hardware Trace Enabled\n");