aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf533
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/mach-bf533')
-rw-r--r--arch/blackfin/mach-bf533/head.S68
1 files changed, 16 insertions, 52 deletions
diff --git a/arch/blackfin/mach-bf533/head.S b/arch/blackfin/mach-bf533/head.S
index 7cb8258841d..1a54ff5f061 100644
--- a/arch/blackfin/mach-bf533/head.S
+++ b/arch/blackfin/mach-bf533/head.S
@@ -481,66 +481,30 @@ ENTRY(_bfin_reset)
481 [p0] = r0; 481 [p0] = r0;
482 SSYNC; 482 SSYNC;
483 483
484 /* Disable the WDOG TIMER */ 484 /* make sure SYSCR is set to use BMODE */
485 p0.h = hi(WDOG_CTL); 485 P0.h = hi(SYSCR);
486 p0.l = lo(WDOG_CTL); 486 P0.l = lo(SYSCR);
487 r0.l = 0xAD6; 487 R0.l = 0x0;
488 w[p0] = r0.l; 488 W[P0] = R0.l;
489 SSYNC;
490
491 /* Clear the sticky bit incase it is already set */
492 p0.h = hi(WDOG_CTL);
493 p0.l = lo(WDOG_CTL);
494 r0.l = 0x8AD6;
495 w[p0] = r0.l;
496 SSYNC; 489 SSYNC;
497 490
498 /* Program the count value */ 491 /* issue a system soft reset */
499 R0.l = 0x100; 492 P1.h = hi(SWRST);
500 R0.h = 0x0; 493 P1.l = lo(SWRST);
501 P0.h = hi(WDOG_CNT); 494 R1.l = 0x0007;
502 P0.l = lo(WDOG_CNT); 495 W[P1] = R1;
503 [P0] = R0;
504 SSYNC; 496 SSYNC;
505 497
506 /* Program WDOG_STAT if necessary */ 498 /* clear system soft reset */
507 P0.h = hi(WDOG_CTL); 499 R0.l = 0x0000;
508 P0.l = lo(WDOG_CTL); 500 W[P0] = R0;
509 R0 = W[P0](Z);
510 CC = BITTST(R0,1);
511 if !CC JUMP .LWRITESTAT;
512 CC = BITTST(R0,2);
513 if !CC JUMP .LWRITESTAT;
514 JUMP .LSKIP_WRITE;
515
516.LWRITESTAT:
517 /* When watch dog timer is enabled, a write to STAT will load the contents of CNT to STAT */
518 R0 = 0x0000(z);
519 P0.h = hi(WDOG_STAT);
520 P0.l = lo(WDOG_STAT)
521 [P0] = R0;
522 SSYNC;
523
524.LSKIP_WRITE:
525 /* Enable the reset event */
526 P0.h = hi(WDOG_CTL);
527 P0.l = lo(WDOG_CTL);
528 R0 = W[P0](Z);
529 BITCLR(R0,1);
530 BITCLR(R0,2);
531 W[P0] = R0.L;
532 SSYNC;
533 NOP;
534
535 /* Enable the wdog counter */
536 R0 = W[P0](Z);
537 BITCLR(R0,4);
538 W[P0] = R0.L;
539 SSYNC; 501 SSYNC;
540 502
541 IDLE; 503 /* issue core reset */
504 raise 1;
542 505
543 RTS; 506 RTS;
507ENDPROC(_bfin_reset)
544 508
545#if CONFIG_DEBUG_KERNEL_START 509#if CONFIG_DEBUG_KERNEL_START
546debug_kernel_start_trap: 510debug_kernel_start_trap: