entry-macro.S
上传用户:szlgq88
上传日期:2009-04-28
资源大小:48287k
文件大小:1k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

  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