Path: blob/master/arch/arm/mach-pxa/include/mach/entry-macro.S
10820 views
/*1* arch/arm/mach-pxa/include/mach/entry-macro.S2*3* Low-level IRQ helper macros for PXA-based platforms4*5* This file is licensed under the terms of the GNU General Public6* License version 2. This program is licensed "as is" without any7* warranty of any kind, whether express or implied.8*/9#include <mach/hardware.h>10#include <mach/irqs.h>1112.macro disable_fiq13.endm1415.macro get_irqnr_preamble, base, tmp16.endm1718.macro arch_ret_to_user, tmp1, tmp219.endm2021.macro get_irqnr_and_base, irqnr, irqstat, base, tmp22mrc p15, 0, \tmp, c0, c0, 0 @ CPUID23mov \tmp, \tmp, lsr #1324and \tmp, \tmp, #0x7 @ Core G25cmp \tmp, #126bhi 1002f2728@ Core Generation 1 (PXA25x)29mov \base, #io_p2v(0x40000000) @ IIR Ctl = 0x40d0000030add \base, \base, #0x00d0000031ldr \irqstat, [\base, #0] @ ICIP32ldr \irqnr, [\base, #4] @ ICMR3334ands \irqnr, \irqstat, \irqnr35beq 1001f36rsb \irqstat, \irqnr, #037and \irqstat, \irqstat, \irqnr38clz \irqnr, \irqstat39rsb \irqnr, \irqnr, #(31 + PXA_IRQ(0))40b 1001f411002:42@ Core Generation 2 (PXA27x) or Core Generation 3 (PXA3xx)43mrc p6, 0, \irqstat, c5, c0, 0 @ ICHP44tst \irqstat, #0x8000000045beq 1001f46bic \irqstat, \irqstat, #0x8000000047mov \irqnr, \irqstat, lsr #1648add \irqnr, \irqnr, #(PXA_IRQ(0))491001:50.endm515253