diff options
author | Mike Frysinger <michael.frysinger@analog.com> | 2007-10-10 12:22:35 -0400 |
---|---|---|
committer | Bryan Wu <bryan.wu@analog.com> | 2007-10-10 12:22:35 -0400 |
commit | 168f1212c098727f2509fe0f66bd30d7209a8159 (patch) | |
tree | e749898e8ab56131a12d8fc489081321abb3ff2f /arch/blackfin/mach-bf537 | |
parent | 27d875f2c134c4b26860ccdd03b4c52cce4efc2c (diff) |
Blackfin arch: rewrite our reboot code in C
rewrite our reboot code in C rather than assembly to be like
other architectures and to allow board maintainers to define
custom behavior
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'arch/blackfin/mach-bf537')
-rw-r--r-- | arch/blackfin/mach-bf537/head.S | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/arch/blackfin/mach-bf537/head.S b/arch/blackfin/mach-bf537/head.S index 0836bfdcc6c5..2c4ae466d4e9 100644 --- a/arch/blackfin/mach-bf537/head.S +++ b/arch/blackfin/mach-bf537/head.S | |||
@@ -478,85 +478,6 @@ ENTRY(_start_dma_code) | |||
478 | ENDPROC(_start_dma_code) | 478 | ENDPROC(_start_dma_code) |
479 | #endif /* CONFIG_BFIN_KERNEL_CLOCK */ | 479 | #endif /* CONFIG_BFIN_KERNEL_CLOCK */ |
480 | 480 | ||
481 | ENTRY(_bfin_reset) | ||
482 | /* No more interrupts to be handled*/ | ||
483 | CLI R6; | ||
484 | SSYNC; | ||
485 | |||
486 | #if defined(CONFIG_MTD_M25P80) | ||
487 | /* | ||
488 | * The following code fix the SPI flash reboot issue, | ||
489 | * /CS signal of the chip which is using PF10 return to GPIO mode | ||
490 | */ | ||
491 | p0.h = hi(PORTF_FER); | ||
492 | p0.l = lo(PORTF_FER); | ||
493 | r0.l = 0x0000; | ||
494 | w[p0] = r0.l; | ||
495 | SSYNC; | ||
496 | |||
497 | /* /CS return to high */ | ||
498 | p0.h = hi(PORTFIO); | ||
499 | p0.l = lo(PORTFIO); | ||
500 | r0.l = 0xFFFF; | ||
501 | w[p0] = r0.l; | ||
502 | SSYNC; | ||
503 | |||
504 | /* Delay some time, This is necessary */ | ||
505 | r1.h = 0; | ||
506 | r1.l = 0x400; | ||
507 | p1 = r1; | ||
508 | lsetup (.L_delay_lab1, .L_delay_lab1_end) lc1 = p1; | ||
509 | .L_delay_lab1: | ||
510 | r0.h = 0; | ||
511 | r0.l = 0x8000; | ||
512 | p0 = r0; | ||
513 | lsetup (.L_delay_lab0, .L_delay_lab0_end) lc0 = p0; | ||
514 | .L_delay_lab0: | ||
515 | nop; | ||
516 | .L_delay_lab0_end: | ||
517 | nop; | ||
518 | .L_delay_lab1_end: | ||
519 | nop; | ||
520 | #endif | ||
521 | |||
522 | /* Clear the IMASK register */ | ||
523 | p0.h = hi(IMASK); | ||
524 | p0.l = lo(IMASK); | ||
525 | r0 = 0x0; | ||
526 | [p0] = r0; | ||
527 | |||
528 | /* Clear the ILAT register */ | ||
529 | p0.h = hi(ILAT); | ||
530 | p0.l = lo(ILAT); | ||
531 | r0 = [p0]; | ||
532 | [p0] = r0; | ||
533 | SSYNC; | ||
534 | |||
535 | /* make sure SYSCR is set to use BMODE */ | ||
536 | P0.h = hi(SYSCR); | ||
537 | P0.l = lo(SYSCR); | ||
538 | R0.l = 0x0; | ||
539 | W[P0] = R0.l; | ||
540 | SSYNC; | ||
541 | |||
542 | /* issue a system soft reset */ | ||
543 | P1.h = hi(SWRST); | ||
544 | P1.l = lo(SWRST); | ||
545 | R1.l = 0x0007; | ||
546 | W[P1] = R1; | ||
547 | SSYNC; | ||
548 | |||
549 | /* clear system soft reset */ | ||
550 | R0.l = 0x0000; | ||
551 | W[P0] = R0; | ||
552 | SSYNC; | ||
553 | |||
554 | /* issue core reset */ | ||
555 | raise 1; | ||
556 | |||
557 | RTS; | ||
558 | ENDPROC(_bfin_reset) | ||
559 | |||
560 | .data | 481 | .data |
561 | 482 | ||
562 | /* | 483 | /* |