aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf533/head.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/mach-bf533/head.S')
-rw-r--r--arch/blackfin/mach-bf533/head.S77
1 files changed, 18 insertions, 59 deletions
diff --git a/arch/blackfin/mach-bf533/head.S b/arch/blackfin/mach-bf533/head.S
index 4808edb0680f..4db9e6240906 100644
--- a/arch/blackfin/mach-bf533/head.S
+++ b/arch/blackfin/mach-bf533/head.S
@@ -173,7 +173,8 @@ ENTRY(__stext)
173 STI R2; 173 STI R2;
174#endif 174#endif
175 175
176 /* Initialise UART */ 176 /* Initialise UART - when booting from u-boot, the UART is not disabled
177 * so if we dont initalize here, our serial console gets hosed */
177 p0.h = hi(UART_LCR); 178 p0.h = hi(UART_LCR);
178 p0.l = lo(UART_LCR); 179 p0.l = lo(UART_LCR);
179 r0 = 0x0(Z); 180 r0 = 0x0(Z);
@@ -468,12 +469,6 @@ ENTRY(_bfin_reset)
468 w[p0] = r0.l; 469 w[p0] = r0.l;
469#endif 470#endif
470 471
471 /* Clear the bits 13-15 in SWRST if they werent cleared */
472 p0.h = hi(SWRST);
473 p0.l = lo(SWRST);
474 csync;
475 r0.l = w[p0];
476
477 /* Clear the IMASK register */ 472 /* Clear the IMASK register */
478 p0.h = hi(IMASK); 473 p0.h = hi(IMASK);
479 p0.l = lo(IMASK); 474 p0.l = lo(IMASK);
@@ -487,66 +482,30 @@ ENTRY(_bfin_reset)
487 [p0] = r0; 482 [p0] = r0;
488 SSYNC; 483 SSYNC;
489 484
490 /* Disable the WDOG TIMER */ 485 /* make sure SYSCR is set to use BMODE */
491 p0.h = hi(WDOG_CTL); 486 P0.h = hi(SYSCR);
492 p0.l = lo(WDOG_CTL); 487 P0.l = lo(SYSCR);
493 r0.l = 0xAD6; 488 R0.l = 0x0;
494 w[p0] = r0.l; 489 W[P0] = R0.l;
495 SSYNC;
496
497 /* Clear the sticky bit incase it is already set */
498 p0.h = hi(WDOG_CTL);
499 p0.l = lo(WDOG_CTL);
500 r0.l = 0x8AD6;
501 w[p0] = r0.l;
502 SSYNC;
503
504 /* Program the count value */
505 R0.l = 0x100;
506 R0.h = 0x0;
507 P0.h = hi(WDOG_CNT);
508 P0.l = lo(WDOG_CNT);
509 [P0] = R0;
510 SSYNC; 490 SSYNC;
511 491
512 /* Program WDOG_STAT if necessary */ 492 /* issue a system soft reset */
513 P0.h = hi(WDOG_CTL); 493 P1.h = hi(SWRST);
514 P0.l = lo(WDOG_CTL); 494 P1.l = lo(SWRST);
515 R0 = W[P0](Z); 495 R1.l = 0x0007;
516 CC = BITTST(R0,1); 496 W[P1] = R1;
517 if !CC JUMP .LWRITESTAT;
518 CC = BITTST(R0,2);
519 if !CC JUMP .LWRITESTAT;
520 JUMP .LSKIP_WRITE;
521
522.LWRITESTAT:
523 /* When watch dog timer is enabled, a write to STAT will load the contents of CNT to STAT */
524 R0 = 0x0000(z);
525 P0.h = hi(WDOG_STAT);
526 P0.l = lo(WDOG_STAT)
527 [P0] = R0;
528 SSYNC; 497 SSYNC;
529 498
530.LSKIP_WRITE: 499 /* clear system soft reset */
531 /* Enable the reset event */ 500 R0.l = 0x0000;
532 P0.h = hi(WDOG_CTL); 501 W[P0] = R0;
533 P0.l = lo(WDOG_CTL);
534 R0 = W[P0](Z);
535 BITCLR(R0,1);
536 BITCLR(R0,2);
537 W[P0] = R0.L;
538 SSYNC;
539 NOP;
540
541 /* Enable the wdog counter */
542 R0 = W[P0](Z);
543 BITCLR(R0,4);
544 W[P0] = R0.L;
545 SSYNC; 502 SSYNC;
546 503
547 IDLE; 504 /* issue core reset */
505 raise 1;
548 506
549 RTS; 507 RTS;
508ENDPROC(_bfin_reset)
550 509
551#if CONFIG_DEBUG_KERNEL_START 510#if CONFIG_DEBUG_KERNEL_START
552debug_kernel_start_trap: 511debug_kernel_start_trap: