entry-macro.S 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * include/asm-arm/arch-ixp2000/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. .macro disable_fiq
  11. .endm
  12. .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
  13. mov \irqnr, #0x0 @clear out irqnr as default
  14. mov \base, #0xfe000000
  15. orr \base, \base, #0x00e00000
  16. orr \base, \base, #0x08
  17. ldr \irqstat, [\base] @ get interrupts
  18. cmp \irqstat, #0
  19. beq 1001f
  20. clz \irqnr, \irqstat
  21. mov \base, #31
  22. subs \irqnr, \base, \irqnr
  23. /*
  24. * We handle PCIA and PCIB here so we don't have an
  25. * extra layer of code just to check these two bits.
  26. */
  27. cmp \irqnr, #IRQ_IXP2000_PCI
  28. bne 1001f
  29. mov \base, #0xfe000000
  30. orr \base, \base, #0x00c00000
  31. orr \base, \base, #0x00000100
  32. orr \base, \base, #0x00000058
  33. ldr \irqstat, [\base]
  34. mov \tmp, #(1<<26)
  35. tst \irqstat, \tmp
  36. movne \irqnr, #IRQ_IXP2000_PCIA
  37. bne 1001f
  38. mov \tmp, #(1<<27)
  39. tst \irqstat, \tmp
  40. movne \irqnr, #IRQ_IXP2000_PCIB
  41. 1001:
  42. .endm