entry-macro.S 920 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Low-level IRQ helper macros for Gemini platform.
  3. *
  4. * Copyright (C) 2001-2006 Storlink, Corp.
  5. * Copyright (C) 2008-2009 Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
  6. *
  7. * This file is licensed under the terms of the GNU General Public
  8. * License version 2. This program is licensed "as is" without any
  9. * warranty of any kind, whether express or implied.
  10. */
  11. #include <mach/hardware.h>
  12. #define IRQ_STATUS 0x14
  13. .macro disable_fiq
  14. .endm
  15. .macro get_irqnr_preamble, base, tmp
  16. .endm
  17. .macro arch_ret_to_user, tmp1, tmp2
  18. .endm
  19. .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
  20. ldr \irqstat, =IO_ADDRESS(GEMINI_INTERRUPT_BASE + IRQ_STATUS)
  21. ldr \irqnr, [\irqstat]
  22. cmp \irqnr, #0
  23. beq 2313f
  24. mov \tmp, \irqnr
  25. mov \irqnr, #0
  26. 2312:
  27. tst \tmp, #1
  28. bne 2313f
  29. add \irqnr, \irqnr, #1
  30. mov \tmp, \tmp, lsr #1
  31. cmp \irqnr, #31
  32. bcc 2312b
  33. 2313:
  34. .endm