entry-macro.S 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * arch/arm/mach-ixp2000/include/mach/entry-macro.S
  3. *
  4. * Low-level IRQ helper macros for IXP2000-based platforms
  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. #include <mach/irqs.h>
  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, irqstat, base, tmp
  18. mov \irqnr, #0x0 @clear out irqnr as default
  19. mov \base, #0xfe000000
  20. orr \base, \base, #0x00e00000
  21. orr \base, \base, #0x08
  22. ldr \irqstat, [\base] @ get interrupts
  23. cmp \irqstat, #0
  24. beq 1001f
  25. clz \irqnr, \irqstat
  26. mov \base, #31
  27. subs \irqnr, \base, \irqnr
  28. /*
  29. * We handle PCIA and PCIB here so we don't have an
  30. * extra layer of code just to check these two bits.
  31. */
  32. cmp \irqnr, #IRQ_IXP2000_PCI
  33. bne 1001f
  34. mov \base, #0xfe000000
  35. orr \base, \base, #0x00c00000
  36. orr \base, \base, #0x00000100
  37. orr \base, \base, #0x00000058
  38. ldr \irqstat, [\base]
  39. mov \tmp, #(1<<26)
  40. tst \irqstat, \tmp
  41. movne \irqnr, #IRQ_IXP2000_PCIA
  42. bne 1001f
  43. mov \tmp, #(1<<27)
  44. tst \irqstat, \tmp
  45. movne \irqnr, #IRQ_IXP2000_PCIB
  46. 1001:
  47. .endm