entry-macro.S 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * include/asm-arm/arch-omap/entry-macro.S
  3. *
  4. * Low-level IRQ helper macros for OMAP-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. #if defined(CONFIG_ARCH_OMAP1)
  11. .macro disable_fiq
  12. .endm
  13. .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
  14. ldr \base, =IO_ADDRESS(OMAP_IH1_BASE)
  15. ldr \irqnr, [\base, #IRQ_ITR_REG_OFFSET]
  16. ldr \tmp, [\base, #IRQ_MIR_REG_OFFSET]
  17. mov \irqstat, #0xffffffff
  18. bic \tmp, \irqstat, \tmp
  19. tst \irqnr, \tmp
  20. beq 1510f
  21. ldr \irqnr, [\base, #IRQ_SIR_FIQ_REG_OFFSET]
  22. cmp \irqnr, #0
  23. ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET]
  24. cmpeq \irqnr, #INT_IH2_IRQ
  25. ldreq \base, =IO_ADDRESS(OMAP_IH2_BASE)
  26. ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET]
  27. addeqs \irqnr, \irqnr, #32
  28. 1510:
  29. .endm
  30. #elif defined(CONFIG_ARCH_OMAP24XX)
  31. #include <asm/arch/omap24xx.h>
  32. .macro disable_fiq
  33. .endm
  34. .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
  35. ldr \base, =VA_IC_BASE
  36. ldr \irqnr, [\base, #0x98] /* IRQ pending reg 1 */
  37. cmp \irqnr, #0x0
  38. bne 2222f
  39. ldr \irqnr, [\base, #0xb8] /* IRQ pending reg 2 */
  40. cmp \irqnr, #0x0
  41. bne 2222f
  42. ldr \irqnr, [\base, #0xd8] /* IRQ pending reg 3 */
  43. cmp \irqnr, #0x0
  44. 2222:
  45. ldrne \irqnr, [\base, #IRQ_SIR_IRQ]
  46. .endm
  47. .macro irq_prio_table
  48. .endm
  49. #endif