entry-macro.S 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * include/asm-arm/arch-iop3xx/entry-macro.S
  3. *
  4. * Low-level IRQ helper macros for IOP3xx-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_IOP321)
  11. .macro disable_fiq
  12. .endm
  13. /*
  14. * Note: only deal with normal interrupts, not FIQ
  15. */
  16. .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
  17. mov \irqnr, #0
  18. mrc p6, 0, \irqstat, c8, c0, 0 @ Read IINTSRC
  19. cmp \irqstat, #0
  20. beq 1001f
  21. clz \irqnr, \irqstat
  22. mov \base, #31
  23. subs \irqnr,\base,\irqnr
  24. add \irqnr,\irqnr,#IRQ_IOP321_DMA0_EOT
  25. 1001:
  26. .endm
  27. #elif defined(CONFIG_ARCH_IOP331)
  28. .macro disable_fiq
  29. .endm
  30. /*
  31. * Note: only deal with normal interrupts, not FIQ
  32. */
  33. .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
  34. mov \irqnr, #0
  35. mrc p6, 0, \irqstat, c4, c0, 0 @ Read IINTSRC0
  36. cmp \irqstat, #0
  37. bne 1002f
  38. mrc p6, 0, \irqstat, c5, c0, 0 @ Read IINTSRC1
  39. cmp \irqstat, #0
  40. beq 1001f
  41. clz \irqnr, \irqstat
  42. rsbs \irqnr,\irqnr,#31 @ recommend by RMK
  43. add \irqnr,\irqnr,#IRQ_IOP331_XINT8
  44. b 1001f
  45. 1002: clz \irqnr, \irqstat
  46. rsbs \irqnr,\irqnr,#31 @ recommend by RMK
  47. add \irqnr,\irqnr,#IRQ_IOP331_DMA0_EOT
  48. 1001:
  49. .endm
  50. #endif