blob: ba1294c13c4dc56939ff7d02ce108980c12d41fd [file] [log] [blame]
Srinidhi Kasagarffae4e02009-11-28 08:10:40 +01001/*
2 * Copyright (C) 2008 STMicroelectronics
3 * Copyright (C) 2009 ST-Ericsson.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 */
10#ifndef ASM_ARCH_IRQS_H
11#define ASM_ARCH_IRQS_H
12
Rabin Vincent60559302010-07-26 11:09:27 +010013#include <mach/irqs-db5500.h>
14#include <mach/irqs-db8500.h>
Srinidhi Kasagarffae4e02009-11-28 08:10:40 +010015
16#define IRQ_LOCALTIMER 29
17#define IRQ_LOCALWDOG 30
18
19/* Shared Peripheral Interrupt (SHPI) */
20#define IRQ_SHPI_START 32
21
22/* Interrupt numbers generic for shared peripheral */
23#define IRQ_MTU0 (IRQ_SHPI_START + 4)
Srinidhi Kasagarffae4e02009-11-28 08:10:40 +010024
25/* There are 128 shared peripheral interrupts assigned to
26 * INTID[160:32]. The first 32 interrupts are reserved.
27 */
Rabin Vincent60559302010-07-26 11:09:27 +010028#define DBX500_NR_INTERNAL_IRQS 161
Rabin Vincent94bdc0e2010-03-03 04:54:37 +010029
30/* After chip-specific IRQ numbers we have the GPIO ones */
31#define NOMADIK_NR_GPIO 288
Rabin Vincent60559302010-07-26 11:09:27 +010032#define NOMADIK_GPIO_TO_IRQ(gpio) ((gpio) + DBX500_NR_INTERNAL_IRQS)
33#define NOMADIK_IRQ_TO_GPIO(irq) ((irq) - DBX500_NR_INTERNAL_IRQS)
34#define IRQ_BOARD_START NOMADIK_GPIO_TO_IRQ(NOMADIK_NR_GPIO)
Srinidhi Kasagarffae4e02009-11-28 08:10:40 +010035
Rabin Vincent60559302010-07-26 11:09:27 +010036/* This will be overridden by board-specific irq headers */
37#define IRQ_BOARD_END IRQ_BOARD_START
38
Rabin Vincent5dc55e02010-12-08 11:07:58 +053039#ifdef CONFIG_MACH_U8500
Rabin Vincent39ae7022010-07-26 11:12:15 +010040#include <mach/irqs-board-mop500.h>
41#endif
42
Linus Walleij4d4a4b02010-09-27 22:09:52 +010043/*
44 * After the board specific IRQ:s we reserve a range of IRQ:s in which virtual
45 * IRQ:s representing modem IRQ:s can be allocated
46 */
47#define IRQ_MODEM_EVENTS_BASE (IRQ_BOARD_END + 1)
48#define IRQ_MODEM_EVENTS_NBR 72
49#define IRQ_MODEM_EVENTS_END (IRQ_MODEM_EVENTS_BASE + IRQ_MODEM_EVENTS_NBR)
50
51/* List of virtual IRQ:s that are allocated from the range above */
52#define MBOX_PAIR0_VIRT_IRQ (IRQ_MODEM_EVENTS_BASE + 43)
53#define MBOX_PAIR1_VIRT_IRQ (IRQ_MODEM_EVENTS_BASE + 45)
54#define MBOX_PAIR2_VIRT_IRQ (IRQ_MODEM_EVENTS_BASE + 41)
55
56#define NR_IRQS IRQ_MODEM_EVENTS_END
Rabin Vincent60559302010-07-26 11:09:27 +010057
58#endif /* ASM_ARCH_IRQS_H */