blob: 8c1e4ff11d5898d57d2eab21e5e6a2c18174285f [file] [log] [blame]
Gregory Bean8f90c7b2010-04-30 21:33:38 -07001/*
Russell Kinga09e64f2008-08-05 16:14:15 +01002 * Copyright (C) 2007 Google, Inc.
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07003 * Copyright (c) 2008-2011, Code Aurora Forum. All rights reserved.
Russell Kinga09e64f2008-08-05 16:14:15 +01004 * 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 Kinga09e64f2008-08-05 16:14:15 +010020#define MSM_IRQ_BIT(irq) (1 << ((irq) & 31))
21
Stepan Moskovchenko2b32a072011-10-18 17:25:31 -070022#if defined(CONFIG_ARCH_MSM8960) || defined(CONFIG_ARCH_APQ8064) || \
23 defined(CONFIG_ARCH_MSM8930)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070024
25#ifdef CONFIG_ARCH_MSM8960
26#include "irqs-8960.h"
27#endif
28
Stepan Moskovchenko2b32a072011-10-18 17:25:31 -070029#ifdef CONFIG_ARCH_MSM8930
30#include "irqs-8930.h"
31#endif
32
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070033#ifdef CONFIG_ARCH_APQ8064
34#include "irqs-8064.h"
35#endif
36
Stepan Moskovchenko8df33f12011-08-05 17:54:37 -070037/* For now, use the maximum number of interrupts until a pending GIC issue
38 * is sorted out */
Abhijeet Dharmapurikar8676ba92011-08-17 10:41:28 -070039#define NR_MSM_IRQS 288
Rohit Vaswani97a7b6e2011-09-23 17:47:23 -070040#define NR_GPIO_IRQS 152
Stepan Moskovchenko8df33f12011-08-05 17:54:37 -070041#define NR_PM8921_IRQS 256
Jay Chokshi44873f72011-08-30 17:24:26 -070042#define NR_PM8821_IRQS 64
Stepan Moskovchenko8df33f12011-08-05 17:54:37 -070043#define NR_TABLA_IRQS 49
44#define NR_GPIO_EXPANDER_IRQS 8
Jay Chokshi44873f72011-08-30 17:24:26 -070045#define NR_BOARD_IRQS (NR_PM8921_IRQS + NR_PM8821_IRQS + \
46 NR_TABLA_IRQS + NR_GPIO_EXPANDER_IRQS)
Stepan Moskovchenko8df33f12011-08-05 17:54:37 -070047#define NR_TLMM_MSM_DIR_CONN_IRQ 8 /*Need to Verify this Count*/
48#define NR_MSM_GPIOS NR_GPIO_IRQS
49
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070050#else
51
Sathish Ambley5b2ec0a2011-10-08 23:03:26 -070052#if defined(CONFIG_ARCH_MSMCOPPER)
53#include "irqs-copper.h"
54#elif defined(CONFIG_ARCH_MSM9615)
Rohit Vaswani01c86312011-08-16 15:25:24 -070055#include "irqs-9615.h"
56#elif defined(CONFIG_ARCH_MSM7X30)
Daniel Walker1b54b392010-05-05 06:53:23 -070057#include "irqs-7x30.h"
58#elif defined(CONFIG_ARCH_QSD8X50)
Daniel Walkere502c372010-05-05 06:45:20 -070059#include "irqs-8x50.h"
60#include "sirc.h"
Steve Muckleed1f31b2009-11-28 13:00:13 -080061#elif defined(CONFIG_ARCH_MSM8X60)
62#include "irqs-8x60.h"
Rohit Vaswani01c86312011-08-16 15:25:24 -070063#elif defined(CONFIG_ARCH_MSM7X01A) || defined(CONFIG_ARCH_MSM7X25) \
64 || defined(CONFIG_ARCH_MSM7X27)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070065#include "irqs-7xxx.h"
66#elif defined(CONFIG_ARCH_FSM9XXX)
67#include "irqs-fsm9xxx.h"
68#include "sirc.h"
Gregory Bean8f90c7b2010-04-30 21:33:38 -070069#else
70#error "Unknown architecture specification"
71#endif
Russell Kinga09e64f2008-08-05 16:14:15 +010072
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070073#endif
74
Gregory Bean8f90c7b2010-04-30 21:33:38 -070075#define NR_IRQS (NR_MSM_IRQS + NR_GPIO_IRQS + NR_BOARD_IRQS)
Russell Kinga09e64f2008-08-05 16:14:15 +010076#define MSM_GPIO_TO_INT(n) (NR_MSM_IRQS + (n))
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070077#define FIRST_GPIO_IRQ MSM_GPIO_TO_INT(0)
Gregory Bean8f90c7b2010-04-30 21:33:38 -070078#define MSM_INT_TO_REG(base, irq) (base + irq / 32)
Russell Kinga09e64f2008-08-05 16:14:15 +010079
80#endif