Commit a9c59c27 authored by Mike Frysinger's avatar Mike Frysinger Committed by Linus Torvalds

Blackfin arch: cache SWRST value at bootup so other things like watchdog can...

Blackfin arch: cache SWRST value at bootup so other things like watchdog can non-destructively query it
Signed-off-by: default avatarMike Frysinger <michael.frysinger@analog.com>
Signed-off-by: default avatarBryan Wu <bryan.wu@analog.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 19381f02
...@@ -43,6 +43,8 @@ ...@@ -43,6 +43,8 @@
#include <asm/blackfin.h> #include <asm/blackfin.h>
#include <asm/cplbinit.h> #include <asm/cplbinit.h>
u16 _bfin_swrst;
unsigned long memory_start, memory_end, physical_mem_end; unsigned long memory_start, memory_end, physical_mem_end;
unsigned long reserved_mem_dcache_on; unsigned long reserved_mem_dcache_on;
unsigned long reserved_mem_icache_on; unsigned long reserved_mem_icache_on;
...@@ -381,6 +383,12 @@ void __init setup_arch(char **cmdline_p) ...@@ -381,6 +383,12 @@ void __init setup_arch(char **cmdline_p)
if (l1_length > L1_DATA_A_LENGTH) if (l1_length > L1_DATA_A_LENGTH)
panic("L1 memory overflow\n"); panic("L1 memory overflow\n");
#ifdef BF561_FAMILY
_bfin_swrst = bfin_read_SICA_SWRST();
#else
_bfin_swrst = bfin_read_SWRST();
#endif
bf53x_cache_init(); bf53x_cache_init();
printk(KERN_INFO "Hardware Trace Enabled\n"); printk(KERN_INFO "Hardware Trace Enabled\n");
......
...@@ -104,6 +104,7 @@ extern unsigned long dpdt_swapcount_table[]; ...@@ -104,6 +104,7 @@ extern unsigned long dpdt_swapcount_table[];
extern unsigned long table_start, table_end; extern unsigned long table_start, table_end;
extern u16 _bfin_swrst; /* shadow for Software Reset Register (SWRST) */
extern struct file_operations dpmc_fops; extern struct file_operations dpmc_fops;
extern char _start; extern char _start;
extern unsigned long _ramstart, _ramend, _rambase; extern unsigned long _ramstart, _ramend, _rambase;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment