blob: 8679a45647447c213902c297efd953aabba7ecba [file] [log] [blame]
Gregory Bean8f90c7b2010-04-30 21:33:38 -07001/*
Russell Kinga09e64f2008-08-05 16:14:15 +01002 * Copyright (C) 2007 Google, Inc.
Gregory Bean8f90c7b2010-04-30 21:33:38 -07003 * Copyright (c) 2008-2010, 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
Daniel Walker1b54b392010-05-05 06:53:23 -070022#if defined(CONFIG_ARCH_MSM7X30)
23#include "irqs-7x30.h"
24#elif defined(CONFIG_ARCH_QSD8X50)
Daniel Walkere502c372010-05-05 06:45:20 -070025#include "irqs-8x50.h"
26#include "sirc.h"
Steve Muckleed1f31b2009-11-28 13:00:13 -080027#elif defined(CONFIG_ARCH_MSM8X60)
28#include "irqs-8x60.h"
Daniel Walkere502c372010-05-05 06:45:20 -070029#elif defined(CONFIG_ARCH_MSM_ARM11)
Gregory Bean8f90c7b2010-04-30 21:33:38 -070030#include "irqs-7x00.h"
31#else
32#error "Unknown architecture specification"
33#endif
Russell Kinga09e64f2008-08-05 16:14:15 +010034
Gregory Bean8f90c7b2010-04-30 21:33:38 -070035#define NR_IRQS (NR_MSM_IRQS + NR_GPIO_IRQS + NR_BOARD_IRQS)
Russell Kinga09e64f2008-08-05 16:14:15 +010036#define MSM_GPIO_TO_INT(n) (NR_MSM_IRQS + (n))
Gregory Bean8f90c7b2010-04-30 21:33:38 -070037#define MSM_INT_TO_REG(base, irq) (base + irq / 32)
Russell Kinga09e64f2008-08-05 16:14:15 +010038
39#endif