mioa701_bootresume.S 961 B

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