Path: blob/master/arch/arm/mach-davinci/include/mach/entry-macro.S
17590 views
/*1* Low-level IRQ helper macros for TI DaVinci-based platforms2*3* Author: Kevin Hilman, MontaVista Software, Inc. <[email protected]>4*5* 2007 (c) MontaVista Software, Inc. This file is licensed under6* the terms of the GNU General Public License version 2. This program7* is licensed "as is" without any warranty of any kind, whether express8* or implied.9*/10#include <mach/io.h>11#include <mach/irqs.h>1213.macro disable_fiq14.endm1516.macro get_irqnr_preamble, base, tmp17ldr \base, =davinci_intc_base18ldr \base, [\base]19.endm2021.macro arch_ret_to_user, tmp1, tmp222.endm2324.macro get_irqnr_and_base, irqnr, irqstat, base, tmp25#if defined(CONFIG_AINTC) && defined(CONFIG_CP_INTC)26ldr \tmp, =davinci_intc_type27ldr \tmp, [\tmp]28cmp \tmp, #DAVINCI_INTC_TYPE_CP_INTC29beq 1001f30#endif31#if defined(CONFIG_AINTC)32ldr \tmp, [\base, #0x14]33movs \tmp, \tmp, lsr #234sub \irqnr, \tmp, #135b 1002f36#endif37#if defined(CONFIG_CP_INTC)381001: ldr \irqnr, [\base, #0x80] /* get irq number */39and \irqnr, \irqnr, #0xff /* irq is in bits 0-9 */40mov \tmp, \irqnr, lsr #341and \tmp, \tmp, #0xfc42add \tmp, \tmp, #0x280 /* get the register offset */43ldr \irqstat, [\base, \tmp] /* get the intc status */44cmp \irqstat, #0x045#endif461002:47.endm4849.macro irq_prio_table50.endm515253