2009-01-20 07:15:18 +01: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 13:02:02 +02:00
|
|
|
#include <asm/irq.h>
|
2009-01-20 07:15:18 +01:00
|
|
|
#include <mach/regs-icu.h>
|
|
|
|
|
|
|
|
.macro get_irqnr_preamble, base, tmp
|
2009-12-04 15:41:28 +01:00
|
|
|
mrc p15, 0, \tmp, c0, c0, 0 @ CPUID
|
|
|
|
and \tmp, \tmp, #0xff00
|
|
|
|
cmp \tmp, #0x5800
|
2012-04-12 13:02:02 +02:00
|
|
|
ldr \base, =mmp_icu_base
|
|
|
|
ldr \base, [\base, #0]
|
2009-12-04 15:41:28 +01:00
|
|
|
addne \base, \base, #0x10c @ PJ1 AP INT SEL register
|
|
|
|
addeq \base, \base, #0x104 @ PJ4 IRQ SEL register
|
2009-01-20 07:15:18 +01:00
|
|
|
.endm
|
|
|
|
|
|
|
|
.macro get_irqnr_and_base, irqnr, irqstat, base, tmp
|
|
|
|
ldr \tmp, [\base, #0]
|
|
|
|
and \irqnr, \tmp, #0x3f
|
|
|
|
tst \tmp, #(1 << 6)
|
|
|
|
.endm
|