Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
irqs-board-mop500.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) ST-Ericsson SA 2010
3  *
4  * Author: Rabin Vincent <[email protected]>
5  * License terms: GNU General Public License (GPL) version 2
6  */
7 
8 #ifndef __MACH_IRQS_BOARD_MOP500_H
9 #define __MACH_IRQS_BOARD_MOP500_H
10 
11 /* Number of AB8500 irqs is taken from header file */
13 
14 #define MOP500_AB8500_IRQ_BASE IRQ_BOARD_START
15 #define MOP500_AB8500_IRQ_END (MOP500_AB8500_IRQ_BASE \
16  + AB8500_MAX_NR_IRQS)
17 
18 /* TC35892 */
19 #define TC35892_NR_INTERNAL_IRQS 8
20 #define TC35892_INT_GPIO(x) (TC35892_NR_INTERNAL_IRQS + (x))
21 #define TC35892_NR_GPIOS 24
22 #define TC35892_NR_IRQS TC35892_INT_GPIO(TC35892_NR_GPIOS)
23 
24 #define MOP500_EGPIO_NR_IRQS TC35892_NR_IRQS
25 
26 #define MOP500_EGPIO_IRQ_BASE MOP500_AB8500_IRQ_END
27 #define MOP500_EGPIO_IRQ_END (MOP500_EGPIO_IRQ_BASE \
28  + MOP500_EGPIO_NR_IRQS)
29 /* STMPE1601 irqs */
30 #define STMPE_NR_INTERNAL_IRQS 9
31 #define STMPE_INT_GPIO(x) (STMPE_NR_INTERNAL_IRQS + (x))
32 #define STMPE_NR_GPIOS 24
33 #define STMPE_NR_IRQS STMPE_INT_GPIO(STMPE_NR_GPIOS)
34 
35 #define MOP500_STMPE1601_IRQBASE MOP500_EGPIO_IRQ_END
36 #define MOP500_STMPE1601_IRQ(x) (MOP500_STMPE1601_IRQBASE + (x))
37 
38 #define MOP500_STMPE1601_IRQ_END \
39  MOP500_STMPE1601_IRQ(STMPE_NR_INTERNAL_IRQS)
40 
41 /* AB8500 virtual gpio IRQ */
42 #define AB8500_VIR_GPIO_NR_IRQS 16
43 
44 #define MOP500_AB8500_VIR_GPIO_IRQ_BASE \
45  MOP500_STMPE1601_IRQ_END
46 #define MOP500_AB8500_VIR_GPIO_IRQ_END \
47  (MOP500_AB8500_VIR_GPIO_IRQ_BASE + AB8500_VIR_GPIO_NR_IRQS)
48 
49 #define MOP500_NR_IRQS MOP500_AB8500_VIR_GPIO_IRQ_END
50 
51 #define MOP500_IRQ_END MOP500_NR_IRQS
52 
53 /*
54  * We may have several boards, but only one will run at a
55  * time, so the one with most IRQs will bump this ahead,
56  * but the IRQ_BOARD_START remains the same for either board.
57  */
58 #if MOP500_IRQ_END > IRQ_BOARD_END
59 #undef IRQ_BOARD_END
60 #define IRQ_BOARD_END MOP500_IRQ_END
61 #endif
62 
63 #endif