entry-macro.S 849 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * include/asm-arm/arch-ebsa110/entry-macro.S
  3. *
  4. * Low-level IRQ helper macros for ebsa110 platform.
  5. *
  6. * This file is licensed under the terms of the GNU General Public
  7. * License version 2. This program is licensed "as is" without any
  8. * warranty of any kind, whether express or implied.
  9. */
  10. #define IRQ_STAT 0xff000000 /* read */
  11. .macro disable_fiq
  12. .endm
  13. .macro get_irqnr_preamble, base, tmp
  14. .endm
  15. .macro arch_ret_to_user, tmp1, tmp2
  16. .endm
  17. .macro get_irqnr_and_base, irqnr, stat, base, tmp
  18. mov \base, #IRQ_STAT
  19. ldrb \stat, [\base] @ get interrupts
  20. mov \irqnr, #0
  21. tst \stat, #15
  22. addeq \irqnr, \irqnr, #4
  23. moveq \stat, \stat, lsr #4
  24. tst \stat, #3
  25. addeq \irqnr, \irqnr, #2
  26. moveq \stat, \stat, lsr #2
  27. tst \stat, #1
  28. addeq \irqnr, \irqnr, #1
  29. moveq \stat, \stat, lsr #1
  30. tst \stat, #1 @ bit 0 should be set
  31. .endm