diff options
author | Rabin Vincent <rabin.vincent@stericsson.com> | 2011-03-29 15:59:51 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2011-05-24 16:11:45 -0400 |
commit | 06be2efaf444f6b639892394e0a6afcd73fe1de4 (patch) | |
tree | 18a3f558219bd81a9d56b5f5e8d0dbcd46a33fcb /arch | |
parent | b25962599bcc31cf685127c682931e07167f3d1a (diff) |
mach-ux500: update SoC and board IRQ handling
This splits out a per-SoC IRQ range handling, so that the
DB8500 and DB5500 SoC:s can reuse aproximately the same IRQ
range with the largest span setting the roof. The same change
is done for the boards, mutatis mutandis, with a new file for
the U5500 board.
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-ux500/include/mach/irqs-board-mop500.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-ux500/include/mach/irqs-board-u5500.h | 21 | ||||
-rw-r--r-- | arch/arm/mach-ux500/include/mach/irqs-db5500.h | 27 | ||||
-rw-r--r-- | arch/arm/mach-ux500/include/mach/irqs-db8500.h | 54 | ||||
-rw-r--r-- | arch/arm/mach-ux500/include/mach/irqs.h | 46 |
5 files changed, 129 insertions, 24 deletions
diff --git a/arch/arm/mach-ux500/include/mach/irqs-board-mop500.h b/arch/arm/mach-ux500/include/mach/irqs-board-mop500.h index 97ef55f84934..47969909836c 100644 --- a/arch/arm/mach-ux500/include/mach/irqs-board-mop500.h +++ b/arch/arm/mach-ux500/include/mach/irqs-board-mop500.h | |||
@@ -50,6 +50,11 @@ | |||
50 | 50 | ||
51 | #define MOP500_IRQ_END MOP500_NR_IRQS | 51 | #define MOP500_IRQ_END MOP500_NR_IRQS |
52 | 52 | ||
53 | /* | ||
54 | * We may have several boards, but only one will run at a | ||
55 | * time, so the one with most IRQs will bump this ahead, | ||
56 | * but the IRQ_BOARD_START remains the same for either board. | ||
57 | */ | ||
53 | #if MOP500_IRQ_END > IRQ_BOARD_END | 58 | #if MOP500_IRQ_END > IRQ_BOARD_END |
54 | #undef IRQ_BOARD_END | 59 | #undef IRQ_BOARD_END |
55 | #define IRQ_BOARD_END MOP500_IRQ_END | 60 | #define IRQ_BOARD_END MOP500_IRQ_END |
diff --git a/arch/arm/mach-ux500/include/mach/irqs-board-u5500.h b/arch/arm/mach-ux500/include/mach/irqs-board-u5500.h new file mode 100644 index 000000000000..29d972c7717b --- /dev/null +++ b/arch/arm/mach-ux500/include/mach/irqs-board-u5500.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * License terms: GNU General Public License (GPL) version 2 | ||
5 | */ | ||
6 | |||
7 | #ifndef __MACH_IRQS_BOARD_U5500_H | ||
8 | #define __MACH_IRQS_BOARD_U5500_H | ||
9 | |||
10 | #define AB5500_NR_IRQS 5 | ||
11 | #define IRQ_AB5500_BASE IRQ_BOARD_START | ||
12 | #define IRQ_AB5500_END (IRQ_AB5500_BASE + AB5500_NR_IRQS) | ||
13 | |||
14 | #define U5500_IRQ_END IRQ_AB5500_END | ||
15 | |||
16 | #if IRQ_BOARD_END < U5500_IRQ_END | ||
17 | #undef IRQ_BOARD_END | ||
18 | #define IRQ_BOARD_END U5500_IRQ_END | ||
19 | #endif | ||
20 | |||
21 | #endif | ||
diff --git a/arch/arm/mach-ux500/include/mach/irqs-db5500.h b/arch/arm/mach-ux500/include/mach/irqs-db5500.h index bfa123dbec3b..77239776a6f2 100644 --- a/arch/arm/mach-ux500/include/mach/irqs-db5500.h +++ b/arch/arm/mach-ux500/include/mach/irqs-db5500.h | |||
@@ -83,4 +83,31 @@ | |||
83 | #define IRQ_DB5500_GPIO6 (IRQ_SHPI_START + 125) | 83 | #define IRQ_DB5500_GPIO6 (IRQ_SHPI_START + 125) |
84 | #define IRQ_DB5500_GPIO7 (IRQ_SHPI_START + 126) | 84 | #define IRQ_DB5500_GPIO7 (IRQ_SHPI_START + 126) |
85 | 85 | ||
86 | #ifdef CONFIG_UX500_SOC_DB5500 | ||
87 | |||
88 | /* | ||
89 | * After the GPIO ones we reserve a range of IRQ:s in which virtual | ||
90 | * IRQ:s representing modem IRQ:s can be allocated | ||
91 | */ | ||
92 | #define IRQ_MODEM_EVENTS_BASE IRQ_SOC_START | ||
93 | #define IRQ_MODEM_EVENTS_NBR 72 | ||
94 | #define IRQ_MODEM_EVENTS_END (IRQ_MODEM_EVENTS_BASE + IRQ_MODEM_EVENTS_NBR) | ||
95 | |||
96 | /* List of virtual IRQ:s that are allocated from the range above */ | ||
97 | #define MBOX_PAIR0_VIRT_IRQ (IRQ_MODEM_EVENTS_BASE + 43) | ||
98 | #define MBOX_PAIR1_VIRT_IRQ (IRQ_MODEM_EVENTS_BASE + 45) | ||
99 | #define MBOX_PAIR2_VIRT_IRQ (IRQ_MODEM_EVENTS_BASE + 41) | ||
100 | |||
101 | /* | ||
102 | * We may have several SoCs, but only one will run at a | ||
103 | * time, so the one with most IRQs will bump this ahead, | ||
104 | * but the IRQ_SOC_START remains the same for either SoC. | ||
105 | */ | ||
106 | #if IRQ_SOC_END < IRQ_MODEM_EVENTS_END | ||
107 | #undef IRQ_SOC_END | ||
108 | #define IRQ_SOC_END IRQ_MODEM_EVENTS_END | ||
109 | #endif | ||
110 | |||
111 | #endif /* CONFIG_UX500_SOC_DB5500 */ | ||
112 | |||
86 | #endif | 113 | #endif |
diff --git a/arch/arm/mach-ux500/include/mach/irqs-db8500.h b/arch/arm/mach-ux500/include/mach/irqs-db8500.h index 8b5d9f0a1633..68bc14974608 100644 --- a/arch/arm/mach-ux500/include/mach/irqs-db8500.h +++ b/arch/arm/mach-ux500/include/mach/irqs-db8500.h | |||
@@ -93,4 +93,58 @@ | |||
93 | #define IRQ_DB8500_GPIO7 (IRQ_SHPI_START + 126) | 93 | #define IRQ_DB8500_GPIO7 (IRQ_SHPI_START + 126) |
94 | #define IRQ_DB8500_GPIO8 (IRQ_SHPI_START + 127) | 94 | #define IRQ_DB8500_GPIO8 (IRQ_SHPI_START + 127) |
95 | 95 | ||
96 | #define IRQ_CA_WAKE_REQ_ED (IRQ_SHPI_START + 71) | ||
97 | #define IRQ_AC_READ_NOTIFICATION_0_ED (IRQ_SHPI_START + 66) | ||
98 | #define IRQ_AC_READ_NOTIFICATION_1_ED (IRQ_SHPI_START + 64) | ||
99 | #define IRQ_CA_MSG_PEND_NOTIFICATION_0_ED (IRQ_SHPI_START + 67) | ||
100 | #define IRQ_CA_MSG_PEND_NOTIFICATION_1_ED (IRQ_SHPI_START + 65) | ||
101 | |||
102 | #define IRQ_CA_WAKE_REQ_V1 (IRQ_SHPI_START + 83) | ||
103 | #define IRQ_AC_READ_NOTIFICATION_0_V1 (IRQ_SHPI_START + 78) | ||
104 | #define IRQ_AC_READ_NOTIFICATION_1_V1 (IRQ_SHPI_START + 76) | ||
105 | #define IRQ_CA_MSG_PEND_NOTIFICATION_0_V1 (IRQ_SHPI_START + 79) | ||
106 | #define IRQ_CA_MSG_PEND_NOTIFICATION_1_V1 (IRQ_SHPI_START + 77) | ||
107 | |||
108 | #ifdef CONFIG_UX500_SOC_DB8500 | ||
109 | |||
110 | /* Virtual interrupts corresponding to the PRCMU wakeups. */ | ||
111 | #define IRQ_PRCMU_BASE IRQ_SOC_START | ||
112 | #define NUM_PRCMU_WAKEUPS (IRQ_PRCMU_END - IRQ_PRCMU_BASE) | ||
113 | |||
114 | #define IRQ_PRCMU_RTC (IRQ_PRCMU_BASE) | ||
115 | #define IRQ_PRCMU_RTT0 (IRQ_PRCMU_BASE + 1) | ||
116 | #define IRQ_PRCMU_RTT1 (IRQ_PRCMU_BASE + 2) | ||
117 | #define IRQ_PRCMU_HSI0 (IRQ_PRCMU_BASE + 3) | ||
118 | #define IRQ_PRCMU_HSI1 (IRQ_PRCMU_BASE + 4) | ||
119 | #define IRQ_PRCMU_CA_WAKE (IRQ_PRCMU_BASE + 5) | ||
120 | #define IRQ_PRCMU_USB (IRQ_PRCMU_BASE + 6) | ||
121 | #define IRQ_PRCMU_ABB (IRQ_PRCMU_BASE + 7) | ||
122 | #define IRQ_PRCMU_ABB_FIFO (IRQ_PRCMU_BASE + 8) | ||
123 | #define IRQ_PRCMU_ARM (IRQ_PRCMU_BASE + 9) | ||
124 | #define IRQ_PRCMU_MODEM_SW_RESET_REQ (IRQ_PRCMU_BASE + 10) | ||
125 | #define IRQ_PRCMU_GPIO0 (IRQ_PRCMU_BASE + 11) | ||
126 | #define IRQ_PRCMU_GPIO1 (IRQ_PRCMU_BASE + 12) | ||
127 | #define IRQ_PRCMU_GPIO2 (IRQ_PRCMU_BASE + 13) | ||
128 | #define IRQ_PRCMU_GPIO3 (IRQ_PRCMU_BASE + 14) | ||
129 | #define IRQ_PRCMU_GPIO4 (IRQ_PRCMU_BASE + 15) | ||
130 | #define IRQ_PRCMU_GPIO5 (IRQ_PRCMU_BASE + 16) | ||
131 | #define IRQ_PRCMU_GPIO6 (IRQ_PRCMU_BASE + 17) | ||
132 | #define IRQ_PRCMU_GPIO7 (IRQ_PRCMU_BASE + 18) | ||
133 | #define IRQ_PRCMU_GPIO8 (IRQ_PRCMU_BASE + 19) | ||
134 | #define IRQ_PRCMU_CA_SLEEP (IRQ_PRCMU_BASE + 20) | ||
135 | #define IRQ_PRCMU_HOTMON_LOW (IRQ_PRCMU_BASE + 21) | ||
136 | #define IRQ_PRCMU_HOTMON_HIGH (IRQ_PRCMU_BASE + 22) | ||
137 | #define IRQ_PRCMU_END (IRQ_PRCMU_BASE + 23) | ||
138 | |||
139 | /* | ||
140 | * We may have several SoCs, but only one will run at a | ||
141 | * time, so the one with most IRQs will bump this ahead, | ||
142 | * but the IRQ_SOC_START remains the same for either SoC. | ||
143 | */ | ||
144 | #if IRQ_SOC_END < IRQ_PRCMU_END | ||
145 | #undef IRQ_SOC_END | ||
146 | #define IRQ_SOC_END IRQ_PRCMU_END | ||
147 | #endif | ||
148 | |||
149 | #endif /* CONFIG_UX500_SOC_DB8500 */ | ||
96 | #endif | 150 | #endif |
diff --git a/arch/arm/mach-ux500/include/mach/irqs.h b/arch/arm/mach-ux500/include/mach/irqs.h index ba1294c13c4d..9db68d264c5f 100644 --- a/arch/arm/mach-ux500/include/mach/irqs.h +++ b/arch/arm/mach-ux500/include/mach/irqs.h | |||
@@ -10,49 +10,47 @@ | |||
10 | #ifndef ASM_ARCH_IRQS_H | 10 | #ifndef ASM_ARCH_IRQS_H |
11 | #define ASM_ARCH_IRQS_H | 11 | #define ASM_ARCH_IRQS_H |
12 | 12 | ||
13 | #include <mach/irqs-db5500.h> | 13 | #include <mach/hardware.h> |
14 | #include <mach/irqs-db8500.h> | ||
15 | 14 | ||
16 | #define IRQ_LOCALTIMER 29 | 15 | #define IRQ_LOCALTIMER 29 |
17 | #define IRQ_LOCALWDOG 30 | 16 | #define IRQ_LOCALWDOG 30 |
18 | 17 | ||
19 | /* Shared Peripheral Interrupt (SHPI) */ | 18 | /* Shared Peripheral Interrupt (SHPI) */ |
20 | #define IRQ_SHPI_START 32 | 19 | #define IRQ_SHPI_START 32 |
21 | 20 | ||
22 | /* Interrupt numbers generic for shared peripheral */ | 21 | /* |
22 | * MTU0 preserved for now until plat-nomadik is taught not to use it. Don't | ||
23 | * add any other IRQs here, use the irqs-dbx500.h files. | ||
24 | */ | ||
23 | #define IRQ_MTU0 (IRQ_SHPI_START + 4) | 25 | #define IRQ_MTU0 (IRQ_SHPI_START + 4) |
24 | 26 | ||
25 | /* There are 128 shared peripheral interrupts assigned to | 27 | #define DBX500_NR_INTERNAL_IRQS 160 |
26 | * INTID[160:32]. The first 32 interrupts are reserved. | ||
27 | */ | ||
28 | #define DBX500_NR_INTERNAL_IRQS 161 | ||
29 | 28 | ||
30 | /* After chip-specific IRQ numbers we have the GPIO ones */ | 29 | /* After chip-specific IRQ numbers we have the GPIO ones */ |
31 | #define NOMADIK_NR_GPIO 288 | 30 | #define NOMADIK_NR_GPIO 288 |
32 | #define NOMADIK_GPIO_TO_IRQ(gpio) ((gpio) + DBX500_NR_INTERNAL_IRQS) | 31 | #define NOMADIK_GPIO_TO_IRQ(gpio) ((gpio) + DBX500_NR_INTERNAL_IRQS) |
33 | #define NOMADIK_IRQ_TO_GPIO(irq) ((irq) - DBX500_NR_INTERNAL_IRQS) | 32 | #define NOMADIK_IRQ_TO_GPIO(irq) ((irq) - DBX500_NR_INTERNAL_IRQS) |
34 | #define IRQ_BOARD_START NOMADIK_GPIO_TO_IRQ(NOMADIK_NR_GPIO) | 33 | #define IRQ_GPIO_END NOMADIK_GPIO_TO_IRQ(NOMADIK_NR_GPIO) |
34 | |||
35 | #define IRQ_SOC_START IRQ_GPIO_END | ||
36 | /* This will be overridden by SoC-specific irq headers */ | ||
37 | #define IRQ_SOC_END IRQ_SOC_START | ||
35 | 38 | ||
39 | #include <mach/irqs-db5500.h> | ||
40 | #include <mach/irqs-db8500.h> | ||
41 | |||
42 | #define IRQ_BOARD_START IRQ_SOC_END | ||
36 | /* This will be overridden by board-specific irq headers */ | 43 | /* This will be overridden by board-specific irq headers */ |
37 | #define IRQ_BOARD_END IRQ_BOARD_START | 44 | #define IRQ_BOARD_END IRQ_BOARD_START |
38 | 45 | ||
39 | #ifdef CONFIG_MACH_U8500 | 46 | #ifdef CONFIG_MACH_U8500 |
40 | #include <mach/irqs-board-mop500.h> | 47 | #include <mach/irqs-board-mop500.h> |
41 | #endif | 48 | #endif |
42 | 49 | ||
43 | /* | 50 | #ifdef CONFIG_MACH_U5500 |
44 | * After the board specific IRQ:s we reserve a range of IRQ:s in which virtual | 51 | #include <mach/irqs-board-u5500.h> |
45 | * IRQ:s representing modem IRQ:s can be allocated | 52 | #endif |
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 | 53 | ||
56 | #define NR_IRQS IRQ_MODEM_EVENTS_END | 54 | #define NR_IRQS IRQ_BOARD_END |
57 | 55 | ||
58 | #endif /* ASM_ARCH_IRQS_H */ | 56 | #endif /* ASM_ARCH_IRQS_H */ |