entry-macro.S 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /* arch/arm/mach-tegra/include/mach/entry-macro.S
  2. *
  3. * Copyright (C) 2009 Palm, Inc.
  4. *
  5. * This software is licensed under the terms of the GNU General Public
  6. * License version 2, as published by the Free Software Foundation, and
  7. * may be copied, distributed, and modified under those terms.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. */
  15. #include <mach/iomap.h>
  16. #include <mach/io.h>
  17. #if defined(CONFIG_ARM_GIC)
  18. #define HAVE_GET_IRQNR_PREAMBLE
  19. #include <asm/hardware/entry-macro-gic.S>
  20. /* Uses the GIC interrupt controller built into the cpu */
  21. #define ICTRL_BASE (IO_CPU_VIRT + 0x100)
  22. .macro disable_fiq
  23. .endm
  24. .macro get_irqnr_preamble, base, tmp
  25. movw \base, #(ICTRL_BASE & 0x0000ffff)
  26. movt \base, #((ICTRL_BASE & 0xffff0000) >> 16)
  27. .endm
  28. .macro arch_ret_to_user, tmp1, tmp2
  29. .endm
  30. #else
  31. /* legacy interrupt controller for AP16 */
  32. .macro disable_fiq
  33. .endm
  34. .macro get_irqnr_preamble, base, tmp
  35. @ enable imprecise aborts
  36. cpsie a
  37. @ EVP base at 0xf010f000
  38. mov \base, #0xf0000000
  39. orr \base, #0x00100000
  40. orr \base, #0x0000f000
  41. .endm
  42. .macro arch_ret_to_user, tmp1, tmp2
  43. .endm
  44. .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
  45. ldr \irqnr, [\base, #0x20] @ EVT_IRQ_STS
  46. cmp \irqnr, #0x80
  47. .endm
  48. #endif