entry-macro.S 1.1 KB
Newer Older
L
Linus Torvalds 已提交
1 2 3 4 5 6 7 8 9
/*
 * include/asm-arm/arch-ixp4xx/entry-macro.S
 *
 * Low-level IRQ helper macros for IXP4xx-based platforms
 *
 * This file is licensed under  the terms of the GNU General Public
 * License version 2. This program is licensed "as is" without any
 * warranty of any kind, whether express or implied.
 */
R
Russell King 已提交
10
#include <asm/hardware.h>
L
Linus Torvalds 已提交
11 12 13 14

		.macro	disable_fiq
		.endm

15 16 17 18 19 20
		.macro  get_irqnr_preamble, base, tmp
		.endm

		.macro  arch_ret_to_user, tmp1, tmp2
		.endm

L
Linus Torvalds 已提交
21 22 23 24
		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
		ldr	\irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP_OFFSET)
		ldr	\irqstat, [\irqstat]		@ get interrupts
		cmp	\irqstat, #0
25
		beq	1001f				@ upper IRQ?
L
Linus Torvalds 已提交
26 27
		clz     \irqnr, \irqstat
		mov     \base, #31
28 29 30
		sub     \irqnr, \base, \irqnr
		b	1002f				@ lower IRQ being
							@ handled
L
Linus Torvalds 已提交
31 32 33 34 35 36 37 38 39 40 41 42 43

1001:
		/*
		 * IXP465 has an upper IRQ status register
		 */
#if defined(CONFIG_CPU_IXP46X)
		ldr	\irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP2_OFFSET)
		ldr	\irqstat, [\irqstat]		@ get upper interrupts
		mov	\irqnr, #63
		clz	\irqstat, \irqstat
 		cmp	\irqstat, #32
		subne	\irqnr, \irqnr, \irqstat
#endif
44
1002:
L
Linus Torvalds 已提交
45 46 47
		.endm