entry-macro.S 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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 disable_fiq
  16. .endm
  17. .macro get_irqnr_preamble, base, tmp
  18. mov \base, #dc21285_high
  19. .if dc21285_low
  20. orr \base, \base, #dc21285_low
  21. .endif
  22. .endm
  23. .macro arch_ret_to_user, tmp1, tmp2
  24. .endm
  25. .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
  26. ldr \irqstat, [\base, #0x180] @ get interrupts
  27. mov \irqnr, #IRQ_SDRAMPARITY
  28. tst \irqstat, #IRQ_MASK_SDRAMPARITY
  29. bne 1001f
  30. tst \irqstat, #IRQ_MASK_UART_RX
  31. movne \irqnr, #IRQ_CONRX
  32. bne 1001f
  33. tst \irqstat, #IRQ_MASK_DMA1
  34. movne \irqnr, #IRQ_DMA1
  35. bne 1001f
  36. tst \irqstat, #IRQ_MASK_DMA2
  37. movne \irqnr, #IRQ_DMA2
  38. bne 1001f
  39. tst \irqstat, #IRQ_MASK_IN0
  40. movne \irqnr, #IRQ_IN0
  41. bne 1001f
  42. tst \irqstat, #IRQ_MASK_IN1
  43. movne \irqnr, #IRQ_IN1
  44. bne 1001f
  45. tst \irqstat, #IRQ_MASK_IN2
  46. movne \irqnr, #IRQ_IN2
  47. bne 1001f
  48. tst \irqstat, #IRQ_MASK_IN3
  49. movne \irqnr, #IRQ_IN3
  50. bne 1001f
  51. tst \irqstat, #IRQ_MASK_PCI
  52. movne \irqnr, #IRQ_PCI
  53. bne 1001f
  54. tst \irqstat, #IRQ_MASK_DOORBELLHOST
  55. movne \irqnr, #IRQ_DOORBELLHOST
  56. bne 1001f
  57. tst \irqstat, #IRQ_MASK_I2OINPOST
  58. movne \irqnr, #IRQ_I2OINPOST
  59. bne 1001f
  60. tst \irqstat, #IRQ_MASK_TIMER1
  61. movne \irqnr, #IRQ_TIMER1
  62. bne 1001f
  63. tst \irqstat, #IRQ_MASK_TIMER2
  64. movne \irqnr, #IRQ_TIMER2
  65. bne 1001f
  66. tst \irqstat, #IRQ_MASK_TIMER3
  67. movne \irqnr, #IRQ_TIMER3
  68. bne 1001f
  69. tst \irqstat, #IRQ_MASK_UART_TX
  70. movne \irqnr, #IRQ_CONTX
  71. bne 1001f
  72. tst \irqstat, #IRQ_MASK_PCI_ABORT
  73. movne \irqnr, #IRQ_PCI_ABORT
  74. bne 1001f
  75. tst \irqstat, #IRQ_MASK_PCI_SERR
  76. movne \irqnr, #IRQ_PCI_SERR
  77. bne 1001f
  78. tst \irqstat, #IRQ_MASK_DISCARD_TIMER
  79. movne \irqnr, #IRQ_DISCARD_TIMER
  80. bne 1001f
  81. tst \irqstat, #IRQ_MASK_PCI_DPERR
  82. movne \irqnr, #IRQ_PCI_DPERR
  83. bne 1001f
  84. tst \irqstat, #IRQ_MASK_PCI_PERR
  85. movne \irqnr, #IRQ_PCI_PERR
  86. 1001:
  87. .endm