entry-macro.S 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* linux/arch/arm/mach-s5p6442/include/mach/entry-macro.S
  2. *
  3. * Copyright (c) 2010 Samsung Electronics Co., Ltd.
  4. * http://www.samsung.com/
  5. *
  6. * Low-level IRQ helper macros for the Samsung S5P6442
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. #include <asm/hardware/vic.h>
  13. #include <mach/map.h>
  14. #include <plat/irqs.h>
  15. .macro disable_fiq
  16. .endm
  17. .macro get_irqnr_preamble, base, tmp
  18. ldr \base, =VA_VIC0
  19. .endm
  20. .macro arch_ret_to_user, tmp1, tmp2
  21. .endm
  22. .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
  23. @ check the vic0
  24. mov \irqnr, # S5P_IRQ_OFFSET + 31
  25. ldr \irqstat, [ \base, # VIC_IRQ_STATUS ]
  26. teq \irqstat, #0
  27. @ otherwise try vic1
  28. addeq \tmp, \base, #(VA_VIC1 - VA_VIC0)
  29. addeq \irqnr, \irqnr, #32
  30. ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ]
  31. teqeq \irqstat, #0
  32. @ otherwise try vic2
  33. addeq \tmp, \base, #(VA_VIC2 - VA_VIC0)
  34. addeq \irqnr, \irqnr, #32
  35. ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ]
  36. teqeq \irqstat, #0
  37. clzne \irqstat, \irqstat
  38. subne \irqnr, \irqnr, \irqstat
  39. .endm