head.S 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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 <linux/config.h>
  7. #include <asm/arch/hwregs/reg_map_asm.h>
  8. #include <asm/arch/hwregs/config_defs_asm.h>
  9. .text
  10. ;; Start clocks for used blocks.
  11. move.d REG_ADDR(config, regi_config, rw_clk_ctrl), $r1
  12. move.d [$r1], $r0
  13. or.d REG_STATE(config, rw_clk_ctrl, cpu, yes) | \
  14. REG_STATE(config, rw_clk_ctrl, bif, yes) | \
  15. REG_STATE(config, rw_clk_ctrl, fix_io, yes), $r0
  16. move.d $r0, [$r1]
  17. ;; Copy 68KB NAND flash to Internal RAM (if NAND boot)
  18. move.d 0x38004000, $r10
  19. move.d 0x8000, $r11
  20. move.d 0x11000, $r12
  21. move.d copy_complete, $r13
  22. and.d 0x000fffff, $r13
  23. or.d 0x38000000, $r13
  24. #include "../../lib/nand_init.S"
  25. ;; No NAND found
  26. move.d CONFIG_ETRAX_PTABLE_SECTOR, $r10
  27. jump $r10 ; Jump to decompresser
  28. nop
  29. copy_complete:
  30. move.d 0x38000000 + CONFIG_ETRAX_PTABLE_SECTOR, $r10
  31. jump $r10 ; Jump to decompresser
  32. nop