2009-01-20 13:15:18 +07:00
|
|
|
/*
|
|
|
|
* linux/arch/arm/mach-mmp/include/mach/entry-macro.S
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*/
|
|
|
|
|
2012-04-12 18:02:02 +07:00
|
|
|
#include <asm/irq.h>
|
2009-01-20 13:15:18 +07:00
|
|
|
#include <mach/regs-icu.h>
|
|
|
|
|
|
|
|
.macro get_irqnr_preamble, base, tmp
|
2009-12-04 21:41:28 +07:00
|
|
|
mrc p15, 0, \tmp, c0, c0, 0 @ CPUID
|
|
|
|
and \tmp, \tmp, #0xff00
|
|
|
|
cmp \tmp, #0x5800
|
2012-04-12 18:02:02 +07:00
|
|
|
ldr \base, =mmp_icu_base
|
|
|
|
ldr \base, [\base, #0]
|
2009-12-04 21:41:28 +07:00
|
|
|
addne \base, \base, #0x10c @ PJ1 AP INT SEL register
|
|
|
|
addeq \base, \base, #0x104 @ PJ4 IRQ SEL register
|
2009-01-20 13:15:18 +07:00
|
|
|
.endm
|
|
|
|
|
|
|
|
.macro get_irqnr_and_base, irqnr, irqstat, base, tmp
|
|
|
|
ldr \tmp, [\base, #0]
|
|
|
|
and \irqnr, \tmp, #0x3f
|
|
|
|
tst \tmp, #(1 << 6)
|
|
|
|
.endm
|