entry-macro.S 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* arch/arm/mach-s3c6400/include/mach/entry-macro.S
  2. *
  3. * Copyright 2008 Openmoko, Inc.
  4. * Copyright 2008 Simtec Electronics
  5. * http://armlinux.simtec.co.uk/
  6. * Ben Dooks <ben@simtec.co.uk>
  7. *
  8. * Low-level IRQ helper macros for the Samsung S3C64XX series
  9. *
  10. * This file is licensed under the terms of the GNU General Public
  11. * License version 2. This program is licensed "as is" without any
  12. * warranty of any kind, whether express or implied.
  13. */
  14. #include <asm/hardware/vic.h>
  15. #include <mach/map.h>
  16. #include <plat/irqs.h>
  17. .macro disable_fiq
  18. .endm
  19. .macro get_irqnr_preamble, base, tmp
  20. ldr \base, =S3C_VA_VIC0
  21. .endm
  22. .macro arch_ret_to_user, tmp1, tmp2
  23. .endm
  24. .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
  25. @ check the vic0
  26. mov \irqnr, # S3C_IRQ_OFFSET + 31
  27. ldr \irqstat, [ \base, # VIC_IRQ_STATUS ]
  28. teq \irqstat, #0
  29. @ otherwise try vic1
  30. addeq \tmp, \base, #(S3C_VA_VIC1 - S3C_VA_VIC0)
  31. addeq \irqnr, \irqnr, #32
  32. ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ]
  33. teqeq \irqstat, #0
  34. clzne \irqstat, \irqstat
  35. subne \irqnr, \irqnr, \irqstat
  36. .endm