entry-macro.S 778 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * linux/include/asm-arm/arch-aaec2000/entry-macro.S
  3. *
  4. * Low-level IRQ helper for aaec-2000 based platforms
  5. *
  6. * Copyright (c) 2005 Nicolas Bellido Y Ortega
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. *
  12. */
  13. .macro disable_fiq
  14. .endm
  15. .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
  16. mov r4, #0xf8000000
  17. add r4, r4, #0x00000500
  18. mov \base, r4
  19. ldr \irqstat, [\base, #0]
  20. cmp \irqstat, #0
  21. bne 1001f
  22. ldr \irqnr, =NR_IRQS+1
  23. b 1003f
  24. 1001: mov \irqnr, #0
  25. 1002: ands \tmp, \irqstat, #1
  26. mov \irqstat, \irqstat, LSR #1
  27. add \irqnr, \irqnr, #1
  28. beq 1002b
  29. sub \irqnr, \irqnr, #1
  30. 1003:
  31. .endm