entry-macro.S 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. /*
  2. * arch/arm/mach-footbridge/include/mach/entry-macro.S
  3. *
  4. * Low-level IRQ helper macros for footbridge-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 <mach/hardware.h>
  11. #include <mach/irqs.h>
  12. #include <asm/hardware/dec21285.h>
  13. .equ dc21285_high, ARMCSR_BASE & 0xff000000
  14. .equ dc21285_low, ARMCSR_BASE & 0x00ffffff
  15. .macro get_irqnr_preamble, base, tmp
  16. mov \base, #dc21285_high
  17. .if dc21285_low
  18. orr \base, \base, #dc21285_low
  19. .endif
  20. .endm
  21. .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
  22. ldr \irqstat, [\base, #0x180] @ get interrupts
  23. mov \irqnr, #IRQ_SDRAMPARITY
  24. tst \irqstat, #IRQ_MASK_SDRAMPARITY
  25. bne 1001f
  26. tst \irqstat, #IRQ_MASK_UART_RX
  27. movne \irqnr, #IRQ_CONRX
  28. bne 1001f
  29. tst \irqstat, #IRQ_MASK_DMA1
  30. movne \irqnr, #IRQ_DMA1
  31. bne 1001f
  32. tst \irqstat, #IRQ_MASK_DMA2
  33. movne \irqnr, #IRQ_DMA2
  34. bne 1001f
  35. tst \irqstat, #IRQ_MASK_IN0
  36. movne \irqnr, #IRQ_IN0
  37. bne 1001f
  38. tst \irqstat, #IRQ_MASK_IN1
  39. movne \irqnr, #IRQ_IN1
  40. bne 1001f
  41. tst \irqstat, #IRQ_MASK_IN2
  42. movne \irqnr, #IRQ_IN2
  43. bne 1001f
  44. tst \irqstat, #IRQ_MASK_IN3
  45. movne \irqnr, #IRQ_IN3
  46. bne 1001f
  47. tst \irqstat, #IRQ_MASK_PCI
  48. movne \irqnr, #IRQ_PCI
  49. bne 1001f
  50. tst \irqstat, #IRQ_MASK_DOORBELLHOST
  51. movne \irqnr, #IRQ_DOORBELLHOST
  52. bne 1001f
  53. tst \irqstat, #IRQ_MASK_I2OINPOST
  54. movne \irqnr, #IRQ_I2OINPOST
  55. bne 1001f
  56. tst \irqstat, #IRQ_MASK_TIMER1
  57. movne \irqnr, #IRQ_TIMER1
  58. bne 1001f
  59. tst \irqstat, #IRQ_MASK_TIMER2
  60. movne \irqnr, #IRQ_TIMER2
  61. bne 1001f
  62. tst \irqstat, #IRQ_MASK_TIMER3
  63. movne \irqnr, #IRQ_TIMER3
  64. bne 1001f
  65. tst \irqstat, #IRQ_MASK_UART_TX
  66. movne \irqnr, #IRQ_CONTX
  67. bne 1001f
  68. tst \irqstat, #IRQ_MASK_PCI_ABORT
  69. movne \irqnr, #IRQ_PCI_ABORT
  70. bne 1001f
  71. tst \irqstat, #IRQ_MASK_PCI_SERR
  72. movne \irqnr, #IRQ_PCI_SERR
  73. bne 1001f
  74. tst \irqstat, #IRQ_MASK_DISCARD_TIMER
  75. movne \irqnr, #IRQ_DISCARD_TIMER
  76. bne 1001f
  77. tst \irqstat, #IRQ_MASK_PCI_DPERR
  78. movne \irqnr, #IRQ_PCI_DPERR
  79. bne 1001f
  80. tst \irqstat, #IRQ_MASK_PCI_PERR
  81. movne \irqnr, #IRQ_PCI_PERR
  82. 1001:
  83. .endm