entry-macro.S 1.4 KB

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