pm_wakeup.S 1022 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * Copyright (c) 2006 Andriy Skulysh <askulsyh@gmail.com>
  3. *
  4. * This file is subject to the terms and conditions of the GNU General Public
  5. * License. See the file "COPYING" in the main directory of this archive
  6. * for more details.
  7. *
  8. */
  9. #include <linux/linkage.h>
  10. #include <asm/cpu/mmu_context.h>
  11. #define k0 r0
  12. #define k1 r1
  13. #define k2 r2
  14. #define k3 r3
  15. #define k4 r4
  16. /*
  17. * Kernel mode register usage:
  18. * k0 scratch
  19. * k1 scratch
  20. * k2 scratch (Exception code)
  21. * k3 scratch (Return address)
  22. * k4 scratch
  23. * k5 reserved
  24. * k6 Global Interrupt Mask (0--15 << 4)
  25. * k7 CURRENT_THREAD_INFO (pointer to current thread info)
  26. */
  27. ENTRY(wakeup_start)
  28. ! clear STBY bit
  29. mov #-126, k2
  30. and #127, k0
  31. mov.b k0, @k2
  32. ! enable refresh
  33. mov.l 5f, k1
  34. mov.w 6f, k0
  35. mov.w k0, @k1
  36. ! jump to handler
  37. mov.l 2f, k2
  38. mov.l 3f, k3
  39. mov.l @k2, k2
  40. mov.l 4f, k1
  41. jmp @k1
  42. nop
  43. .align 2
  44. 1: .long EXPEVT
  45. 2: .long INTEVT
  46. 3: .long ret_from_irq
  47. 4: .long handle_exception
  48. 5: .long 0xffffff68
  49. 6: .word 0x0524
  50. ENTRY(wakeup_end)
  51. nop