Rabin Vincent | 39ae702 | 2010-07-26 11:12:15 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) ST-Ericsson SA 2010 |
| 3 | * |
| 4 | * Author: Rabin Vincent <rabin.vincent@stericsson.com> |
| 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 | |
Mattias Wallin | a5de3dc | 2010-12-02 13:46:00 +0100 | [diff] [blame] | 11 | /* Number of AB8500 irqs is taken from header file */ |
Linus Walleij | ee66e65 | 2011-12-02 14:16:33 +0100 | [diff] [blame] | 12 | #include <linux/mfd/abx500/ab8500.h> |
Rabin Vincent | 39ae702 | 2010-07-26 11:12:15 +0100 | [diff] [blame] | 13 | |
| 14 | #define MOP500_AB8500_IRQ_BASE IRQ_BOARD_START |
| 15 | #define MOP500_AB8500_IRQ_END (MOP500_AB8500_IRQ_BASE \ |
Linus Walleij | d625552 | 2012-02-20 21:42:24 +0100 | [diff] [blame] | 16 | + AB8500_MAX_NR_IRQS) |
Rabin Vincent | b8410a1 | 2010-08-09 19:18:17 +0530 | [diff] [blame] | 17 | |
Sundar Iyer | 556fb03 | 2010-12-03 20:35:38 +0530 | [diff] [blame] | 18 | /* TC35892 */ |
Rabin Vincent | b8410a1 | 2010-08-09 19:18:17 +0530 | [diff] [blame] | 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) |
Sundar Iyer | 556fb03 | 2010-12-03 20:35:38 +0530 | [diff] [blame] | 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) |
Rabin Vincent | b8410a1 | 2010-08-09 19:18:17 +0530 | [diff] [blame] | 34 | |
Sundar Iyer | 556fb03 | 2010-12-03 20:35:38 +0530 | [diff] [blame] | 35 | #define MOP500_STMPE1601_IRQBASE MOP500_EGPIO_IRQ_END |
| 36 | #define MOP500_STMPE1601_IRQ(x) (MOP500_STMPE1601_IRQBASE + (x)) |
| 37 | |
Bibek Basu | 3ef374a | 2011-02-15 12:56:16 +0530 | [diff] [blame] | 38 | #define MOP500_STMPE1601_IRQ_END \ |
| 39 | MOP500_STMPE1601_IRQ(STMPE_NR_INTERNAL_IRQS) |
Sundar Iyer | 556fb03 | 2010-12-03 20:35:38 +0530 | [diff] [blame] | 40 | |
Lee Jones | c3f78f0 | 2013-01-15 16:41:43 +0000 | [diff] [blame] | 41 | #define MOP500_NR_IRQS MOP500_STMPE1601_IRQ_END |
Bibek Basu | 3ef374a | 2011-02-15 12:56:16 +0530 | [diff] [blame] | 42 | |
| 43 | #define MOP500_IRQ_END MOP500_NR_IRQS |
Rabin Vincent | 39ae702 | 2010-07-26 11:12:15 +0100 | [diff] [blame] | 44 | |
Rabin Vincent | 06be2ef | 2011-03-29 21:59:51 +0200 | [diff] [blame] | 45 | /* |
| 46 | * We may have several boards, but only one will run at a |
| 47 | * time, so the one with most IRQs will bump this ahead, |
| 48 | * but the IRQ_BOARD_START remains the same for either board. |
| 49 | */ |
Rabin Vincent | 39ae702 | 2010-07-26 11:12:15 +0100 | [diff] [blame] | 50 | #if MOP500_IRQ_END > IRQ_BOARD_END |
| 51 | #undef IRQ_BOARD_END |
| 52 | #define IRQ_BOARD_END MOP500_IRQ_END |
| 53 | #endif |
| 54 | |
| 55 | #endif |