mioa701_bootresume.S 962 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* Bootloader to resume MIO A701
  2. *
  3. * 2007-1-12 Robert Jarzmik
  4. *
  5. * This code is licenced under the GPLv2.
  6. */
  7. #include <linux/linkage.h>
  8. #include <asm/assembler.h>
  9. /*
  10. * Note: Yes, part of the following code is located into the .data section.
  11. * This is to allow jumpaddr to be accessed with a relative load
  12. * while we can't rely on any MMU translation. We could have put
  13. * sleep_save_sp in the .text section as well, but some setups might
  14. * insist on it to be truly read-only.
  15. */
  16. .data
  17. .align 2
  18. ENTRY(mioa701_bootstrap)
  19. 0:
  20. b 1f
  21. ENTRY(mioa701_jumpaddr)
  22. .word 0x40f00008 @ PSPR in no-MMU mode
  23. 1:
  24. mov r0, #0xa0000000 @ Don't suppose memory access works
  25. orr r0, r0, #0x00200000 @ even if it's supposed to
  26. orr r0, r0, #0x0000b000
  27. mov r1, #0
  28. str r1, [r0] @ Early disable resume for next boot
  29. ldr r0, mioa701_jumpaddr @ (Murphy's Law)
  30. ldr r0, [r0]
  31. ret r0
  32. 2:
  33. ENTRY(mioa701_bootstrap_lg)
  34. .data
  35. .align 2
  36. .word 2b-0b