Gregory Bean | 8f90c7b | 2010-04-30 21:33:38 -0700 | [diff] [blame] | 1 | /* |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 2 | * Copyright (C) 2007 Google, Inc. |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 3 | * Copyright (c) 2008-2011, Code Aurora Forum. All rights reserved. |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 4 | * Author: Brian Swetland <swetland@google.com> |
| 5 | * |
| 6 | * This software is licensed under the terms of the GNU General Public |
| 7 | * License version 2, as published by the Free Software Foundation, and |
| 8 | * may be copied, distributed, and modified under those terms. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | */ |
| 16 | |
| 17 | #ifndef __ASM_ARCH_MSM_IRQS_H |
| 18 | #define __ASM_ARCH_MSM_IRQS_H |
| 19 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 20 | #define MSM_IRQ_BIT(irq) (1 << ((irq) & 31)) |
| 21 | |
Stepan Moskovchenko | 2b32a07 | 2011-10-18 17:25:31 -0700 | [diff] [blame] | 22 | #if defined(CONFIG_ARCH_MSM8960) || defined(CONFIG_ARCH_APQ8064) || \ |
| 23 | defined(CONFIG_ARCH_MSM8930) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 24 | |
| 25 | #ifdef CONFIG_ARCH_MSM8960 |
| 26 | #include "irqs-8960.h" |
| 27 | #endif |
| 28 | |
Stepan Moskovchenko | 2b32a07 | 2011-10-18 17:25:31 -0700 | [diff] [blame] | 29 | #ifdef CONFIG_ARCH_MSM8930 |
| 30 | #include "irqs-8930.h" |
| 31 | #endif |
| 32 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 33 | #ifdef CONFIG_ARCH_APQ8064 |
| 34 | #include "irqs-8064.h" |
| 35 | #endif |
| 36 | |
Stepan Moskovchenko | 8df33f1 | 2011-08-05 17:54:37 -0700 | [diff] [blame] | 37 | /* For now, use the maximum number of interrupts until a pending GIC issue |
| 38 | * is sorted out */ |
Abhijeet Dharmapurikar | 8676ba9 | 2011-08-17 10:41:28 -0700 | [diff] [blame] | 39 | #define NR_MSM_IRQS 288 |
Rohit Vaswani | 97a7b6e | 2011-09-23 17:47:23 -0700 | [diff] [blame] | 40 | #define NR_GPIO_IRQS 152 |
Stepan Moskovchenko | 8df33f1 | 2011-08-05 17:54:37 -0700 | [diff] [blame] | 41 | #define NR_PM8921_IRQS 256 |
Jay Chokshi | 44873f7 | 2011-08-30 17:24:26 -0700 | [diff] [blame] | 42 | #define NR_PM8821_IRQS 64 |
Stepan Moskovchenko | 8df33f1 | 2011-08-05 17:54:37 -0700 | [diff] [blame] | 43 | #define NR_TABLA_IRQS 49 |
| 44 | #define NR_GPIO_EXPANDER_IRQS 8 |
Jay Chokshi | 44873f7 | 2011-08-30 17:24:26 -0700 | [diff] [blame] | 45 | #define NR_BOARD_IRQS (NR_PM8921_IRQS + NR_PM8821_IRQS + \ |
| 46 | NR_TABLA_IRQS + NR_GPIO_EXPANDER_IRQS) |
Stepan Moskovchenko | 8df33f1 | 2011-08-05 17:54:37 -0700 | [diff] [blame] | 47 | #define NR_TLMM_MSM_DIR_CONN_IRQ 8 /*Need to Verify this Count*/ |
| 48 | #define NR_MSM_GPIOS NR_GPIO_IRQS |
| 49 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 50 | #else |
| 51 | |
Sathish Ambley | 5b2ec0a | 2011-10-08 23:03:26 -0700 | [diff] [blame] | 52 | #if defined(CONFIG_ARCH_MSMCOPPER) |
| 53 | #include "irqs-copper.h" |
| 54 | #elif defined(CONFIG_ARCH_MSM9615) |
Rohit Vaswani | 01c8631 | 2011-08-16 15:25:24 -0700 | [diff] [blame] | 55 | #include "irqs-9615.h" |
| 56 | #elif defined(CONFIG_ARCH_MSM7X30) |
Daniel Walker | 1b54b39 | 2010-05-05 06:53:23 -0700 | [diff] [blame] | 57 | #include "irqs-7x30.h" |
| 58 | #elif defined(CONFIG_ARCH_QSD8X50) |
Daniel Walker | e502c37 | 2010-05-05 06:45:20 -0700 | [diff] [blame] | 59 | #include "irqs-8x50.h" |
| 60 | #include "sirc.h" |
Steve Muckle | ed1f31b | 2009-11-28 13:00:13 -0800 | [diff] [blame] | 61 | #elif defined(CONFIG_ARCH_MSM8X60) |
| 62 | #include "irqs-8x60.h" |
Rohit Vaswani | 01c8631 | 2011-08-16 15:25:24 -0700 | [diff] [blame] | 63 | #elif defined(CONFIG_ARCH_MSM7X01A) || defined(CONFIG_ARCH_MSM7X25) \ |
| 64 | || defined(CONFIG_ARCH_MSM7X27) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 65 | #include "irqs-7xxx.h" |
| 66 | #elif defined(CONFIG_ARCH_FSM9XXX) |
| 67 | #include "irqs-fsm9xxx.h" |
| 68 | #include "sirc.h" |
Gregory Bean | 8f90c7b | 2010-04-30 21:33:38 -0700 | [diff] [blame] | 69 | #else |
| 70 | #error "Unknown architecture specification" |
| 71 | #endif |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 72 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 73 | #endif |
| 74 | |
Gregory Bean | 8f90c7b | 2010-04-30 21:33:38 -0700 | [diff] [blame] | 75 | #define NR_IRQS (NR_MSM_IRQS + NR_GPIO_IRQS + NR_BOARD_IRQS) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 76 | #define MSM_GPIO_TO_INT(n) (NR_MSM_IRQS + (n)) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 77 | #define FIRST_GPIO_IRQ MSM_GPIO_TO_INT(0) |
Gregory Bean | 8f90c7b | 2010-04-30 21:33:38 -0700 | [diff] [blame] | 78 | #define MSM_INT_TO_REG(base, irq) (base + irq / 32) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 79 | |
| 80 | #endif |