entry-macro.S 716 B

1234567891011121314151617181920212223242526
  1. /*
  2. * linux/arch/arm/mach-mmp/include/mach/entry-macro.S
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. #include <asm/irq.h>
  9. #include <mach/regs-icu.h>
  10. .macro get_irqnr_preamble, base, tmp
  11. mrc p15, 0, \tmp, c0, c0, 0 @ CPUID
  12. and \tmp, \tmp, #0xff00
  13. cmp \tmp, #0x5800
  14. ldr \base, =mmp_icu_base
  15. ldr \base, [\base, #0]
  16. addne \base, \base, #0x10c @ PJ1 AP INT SEL register
  17. addeq \base, \base, #0x104 @ PJ4 IRQ SEL register
  18. .endm
  19. .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
  20. ldr \tmp, [\base, #0]
  21. and \irqnr, \tmp, #0x3f
  22. tst \tmp, #(1 << 6)
  23. .endm