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

嵌入式Linux

开发平台:

Unix_Linux

  1. /*
  2.  * include/asm-arm/arch-versatile/entry-macro.S
  3.  *
  4.  * Low-level IRQ helper macros for Versatile 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. ldr base, =IO_ADDRESS(VERSATILE_VIC_BASE)
  14. ldr irqstat, [base, #VIC_IRQ_STATUS] @ get masked status
  15. mov irqnr, #0
  16. teq irqstat, #0
  17. beq 1003f
  18. 1001: tst irqstat, #15
  19. bne 1002f
  20. add irqnr, irqnr, #4
  21. movs irqstat, irqstat, lsr #4
  22. bne 1001b
  23. 1002: tst irqstat, #1
  24. bne 1003f
  25. add irqnr, irqnr, #1
  26. movs irqstat, irqstat, lsr #1
  27. bne 1002b
  28. 1003: /* EQ will be set if no irqs pending */
  29. @ clz irqnr, irqstat
  30. @1003: /* EQ will be set if we reach MAXIRQNUM */
  31. .endm