PageRenderTime 138ms CodeModel.GetById 12ms RepoModel.GetById 1ms app.codeStats 0ms

/arch/arm/mach-ep93xx/include/mach/entry-macro.S

https://bitbucket.org/sammyz/iscream_thunderc-2.6.35-rebase
Assembly | 59 lines | 48 code | 11 blank | 0 comment | 1 complexity | 07d07e42026a2952f9f570c9a061760e MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.0, AGPL-1.0
  1. /*
  2. * arch/arm/mach-ep93xx/include/mach/entry-macro.S
  3. * IRQ demultiplexing for EP93xx
  4. *
  5. * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or (at
  10. * your option) any later version.
  11. */
  12. #include <mach/ep93xx-regs.h>
  13. .macro disable_fiq
  14. .endm
  15. .macro get_irqnr_preamble, base, tmp
  16. .endm
  17. .macro arch_ret_to_user, tmp1, tmp2
  18. .endm
  19. .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
  20. ldr \base, =(EP93XX_AHB_VIRT_BASE)
  21. orr \base, \base, #0x000b0000
  22. mov \irqnr, #0
  23. ldr \irqstat, [\base] @ lower 32 interrupts
  24. cmp \irqstat, #0
  25. bne 1001f
  26. eor \base, \base, #0x00070000
  27. ldr \irqstat, [\base] @ upper 32 interrupts
  28. cmp \irqstat, #0
  29. beq 1002f
  30. mov \irqnr, #0x20
  31. 1001:
  32. movs \tmp, \irqstat, lsl #16
  33. movne \irqstat, \tmp
  34. addeq \irqnr, \irqnr, #16
  35. movs \tmp, \irqstat, lsl #8
  36. movne \irqstat, \tmp
  37. addeq \irqnr, \irqnr, #8
  38. movs \tmp, \irqstat, lsl #4
  39. movne \irqstat, \tmp
  40. addeq \irqnr, \irqnr, #4
  41. movs \tmp, \irqstat, lsl #2
  42. movne \irqstat, \tmp
  43. addeq \irqnr, \irqnr, #2
  44. movs \tmp, \irqstat, lsl #1
  45. addeq \irqnr, \irqnr, #1
  46. orrs \base, \base, #1
  47. 1002:
  48. .endm