瀏覽代碼

[Blackfin] arch: Fix BUG - kernel sometimes would stuck with KEYBOARD_GPIO on

Make sure the SYSTEM reset completes before we issue the CORE reset

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Michael Hennerich 17 年之前
父節點
當前提交
a546b0ac59
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      arch/blackfin/kernel/reboot.c

+ 2 - 0
arch/blackfin/kernel/reboot.c

@@ -34,9 +34,11 @@ void bfin_reset(void)
 	while (1) {
 	while (1) {
 		/* initiate system soft reset with magic 0x7 */
 		/* initiate system soft reset with magic 0x7 */
 		bfin_write_SWRST(0x7);
 		bfin_write_SWRST(0x7);
+		bfin_read_SWRST();
 		asm("ssync;");
 		asm("ssync;");
 		/* clear system soft reset */
 		/* clear system soft reset */
 		bfin_write_SWRST(0);
 		bfin_write_SWRST(0);
+		bfin_read_SWRST();
 		asm("ssync;");
 		asm("ssync;");
 		/* issue core reset */
 		/* issue core reset */
 		asm("raise 1");
 		asm("raise 1");