entry-macro.S 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright (C) 2007 Lennert Buytenhek <buytenh@wantstofly.org>
  3. * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
  4. */
  5. /*
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. @ this macro disables fast irq (not implemented)
  11. .macro disable_fiq
  12. .endm
  13. .macro get_irqnr_preamble, base, tmp
  14. .endm
  15. .macro arch_ret_to_user, tmp1, tmp2
  16. .endm
  17. @ this macro checks which interrupt occured
  18. @ and returns its number in irqnr
  19. @ and returns if an interrupt occured in irqstat
  20. .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
  21. ldr \base, =AVIC_IO_ADDRESS(AVIC_BASE_ADDR)
  22. @ Load offset & priority of the highest priority
  23. @ interrupt pending from AVIC_NIVECSR
  24. ldr \irqstat, [\base, #0x40]
  25. @ Shift to get the decoded IRQ number, using ASR so
  26. @ 'no interrupt pending' becomes 0xffffffff
  27. mov \irqnr, \irqstat, asr #16
  28. @ set zero flag if IRQ + 1 == 0
  29. adds \tmp, \irqnr, #1
  30. .endm
  31. @ irq priority table (not used)
  32. .macro irq_prio_table
  33. .endm