clocksource: make CLOCKSOURCE_OF_DECLARE type safe
[cascardo/linux.git] / arch / arm / mach-prima2 / include / mach / entry-macro.S
1 /*
2  * arch/arm/mach-prima2/include/mach/entry-macro.S
3  *
4  * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
5  *
6  * Licensed under GPLv2 or later.
7  */
8
9 #include <mach/hardware.h>
10
11 #define SIRFSOC_INT_ID 0x38
12
13         .macro  get_irqnr_preamble, base, tmp
14         ldr     \base, =sirfsoc_intc_base
15         ldr     \base, [\base]
16         .endm
17
18         .macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
19         ldr \irqnr, [\base, #SIRFSOC_INT_ID]    @ Get the highest priority irq
20         cmp \irqnr, #0x40                       @ the irq num can't be larger than 0x3f
21         movges \irqnr, #0
22         .endm