Blackfin: fix accidental reset in some boot modes
commit18cfced241c5482e94324301bb88ac6503aee6c8
authorSonic Zhang <sonic.zhang@analog.com>
Mon, 15 Jun 2009 07:39:19 +0000 (15 07:39 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 20 Jul 2009 03:38:48 +0000 (19 20:38 -0700)
tree2eaa1aaa7dd6ee7a310a04e8b9d2f0dfd3de80a0
parent310c34c21c0ff605ff130021c827eabd83cd0b3c
Blackfin: fix accidental reset in some boot modes

commit 0de4adfb8c9674fa1572b0ff1371acc94b0be901 upstream.

We read the SWRST (Software Reset) register to get at the last reset
state, and then we may configure the DOUBLE_FAULT bit to control behavior
when a double fault occurs.  But if the lower bits of the register is
already set (like UART boot mode on a BF54x), we inadvertently make the
system reset by writing to the SYSTEM_RESET field at the same time.  So
make sure the lower 4 bits are always cleared.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/blackfin/kernel/setup.c