head.S 1023 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* $Id: head.S,v 1.4 2004/11/01 16:10:28 starvik Exp $
  2. *
  3. * This used to be the rescue code but now that is handled by the
  4. * RedBoot based RFL instead. Nothing to see here, move along.
  5. */
  6. #include <asm/arch/hwregs/reg_map_asm.h>
  7. #include <asm/arch/hwregs/config_defs_asm.h>
  8. .text
  9. ;; Start clocks for used blocks.
  10. move.d REG_ADDR(config, regi_config, rw_clk_ctrl), $r1
  11. move.d [$r1], $r0
  12. or.d REG_STATE(config, rw_clk_ctrl, cpu, yes) | \
  13. REG_STATE(config, rw_clk_ctrl, bif, yes) | \
  14. REG_STATE(config, rw_clk_ctrl, fix_io, yes), $r0
  15. move.d $r0, [$r1]
  16. ;; Copy 68KB NAND flash to Internal RAM (if NAND boot)
  17. move.d 0x38004000, $r10
  18. move.d 0x8000, $r11
  19. move.d 0x11000, $r12
  20. move.d copy_complete, $r13
  21. and.d 0x000fffff, $r13
  22. or.d 0x38000000, $r13
  23. #include "../../lib/nand_init.S"
  24. ;; No NAND found
  25. move.d CONFIG_ETRAX_PTABLE_SECTOR, $r10
  26. jump $r10 ; Jump to decompresser
  27. nop
  28. copy_complete:
  29. move.d 0x38000000 + CONFIG_ETRAX_PTABLE_SECTOR, $r10
  30. jump $r10 ; Jump to decompresser
  31. nop