diff options
Diffstat (limited to 'arch')
52 files changed, 215 insertions, 99 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 5ebc5d922ea1..975b5ddc60e9 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -397,6 +397,7 @@ config ARCH_MXC | |||
397 | select CLKSRC_MMIO | 397 | select CLKSRC_MMIO |
398 | select GENERIC_IRQ_CHIP | 398 | select GENERIC_IRQ_CHIP |
399 | select HAVE_SCHED_CLOCK | 399 | select HAVE_SCHED_CLOCK |
400 | select MULTI_IRQ_HANDLER | ||
400 | help | 401 | help |
401 | Support for Freescale MXC/iMX-based family of processors | 402 | Support for Freescale MXC/iMX-based family of processors |
402 | 403 | ||
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 4792fd55490b..b4e1bf8757c7 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
@@ -470,6 +470,7 @@ config MACH_QONG | |||
470 | bool "Support Dave/DENX QongEVB-LITE platform" | 470 | bool "Support Dave/DENX QongEVB-LITE platform" |
471 | select SOC_IMX31 | 471 | select SOC_IMX31 |
472 | select IMX_HAVE_PLATFORM_IMX_UART | 472 | select IMX_HAVE_PLATFORM_IMX_UART |
473 | select IMX_HAVE_PLATFORM_IMX2_WDT | ||
473 | help | 474 | help |
474 | Include support for Dave/DENX QongEVB-LITE platform. This includes | 475 | Include support for Dave/DENX QongEVB-LITE platform. This includes |
475 | specific configurations for the board and its peripherals. | 476 | specific configurations for the board and its peripherals. |
diff --git a/arch/arm/mach-imx/mach-apf9328.c b/arch/arm/mach-imx/mach-apf9328.c index a404c89485ca..1e486e67dabb 100644 --- a/arch/arm/mach-imx/mach-apf9328.c +++ b/arch/arm/mach-imx/mach-apf9328.c | |||
@@ -136,6 +136,7 @@ MACHINE_START(APF9328, "Armadeus APF9328") | |||
136 | .map_io = mx1_map_io, | 136 | .map_io = mx1_map_io, |
137 | .init_early = imx1_init_early, | 137 | .init_early = imx1_init_early, |
138 | .init_irq = mx1_init_irq, | 138 | .init_irq = mx1_init_irq, |
139 | .handle_irq = imx1_handle_irq, | ||
139 | .timer = &apf9328_timer, | 140 | .timer = &apf9328_timer, |
140 | .init_machine = apf9328_init, | 141 | .init_machine = apf9328_init, |
141 | MACHINE_END | 142 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-armadillo5x0.c b/arch/arm/mach-imx/mach-armadillo5x0.c index ede2710f8b76..f5b4469310dc 100644 --- a/arch/arm/mach-imx/mach-armadillo5x0.c +++ b/arch/arm/mach-imx/mach-armadillo5x0.c | |||
@@ -562,6 +562,7 @@ MACHINE_START(ARMADILLO5X0, "Armadillo-500") | |||
562 | .map_io = mx31_map_io, | 562 | .map_io = mx31_map_io, |
563 | .init_early = imx31_init_early, | 563 | .init_early = imx31_init_early, |
564 | .init_irq = mx31_init_irq, | 564 | .init_irq = mx31_init_irq, |
565 | .handle_irq = imx31_handle_irq, | ||
565 | .timer = &armadillo5x0_timer, | 566 | .timer = &armadillo5x0_timer, |
566 | .init_machine = armadillo5x0_init, | 567 | .init_machine = armadillo5x0_init, |
567 | MACHINE_END | 568 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-bug.c b/arch/arm/mach-imx/mach-bug.c index f49470553bdf..313f62ddc1ef 100644 --- a/arch/arm/mach-imx/mach-bug.c +++ b/arch/arm/mach-imx/mach-bug.c | |||
@@ -62,6 +62,7 @@ MACHINE_START(BUG, "BugLabs BUGBase") | |||
62 | .map_io = mx31_map_io, | 62 | .map_io = mx31_map_io, |
63 | .init_early = imx31_init_early, | 63 | .init_early = imx31_init_early, |
64 | .init_irq = mx31_init_irq, | 64 | .init_irq = mx31_init_irq, |
65 | .handle_irq = imx31_handle_irq, | ||
65 | .timer = &bug_timer, | 66 | .timer = &bug_timer, |
66 | .init_machine = bug_board_init, | 67 | .init_machine = bug_board_init, |
67 | MACHINE_END | 68 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c index 87887ac5806b..b0cd62d6a3cd 100644 --- a/arch/arm/mach-imx/mach-cpuimx27.c +++ b/arch/arm/mach-imx/mach-cpuimx27.c | |||
@@ -315,6 +315,7 @@ MACHINE_START(CPUIMX27, "EUKREA CPUIMX27") | |||
315 | .map_io = mx27_map_io, | 315 | .map_io = mx27_map_io, |
316 | .init_early = imx27_init_early, | 316 | .init_early = imx27_init_early, |
317 | .init_irq = mx27_init_irq, | 317 | .init_irq = mx27_init_irq, |
318 | .handle_irq = imx27_handle_irq, | ||
318 | .timer = &eukrea_cpuimx27_timer, | 319 | .timer = &eukrea_cpuimx27_timer, |
319 | .init_machine = eukrea_cpuimx27_init, | 320 | .init_machine = eukrea_cpuimx27_init, |
320 | MACHINE_END | 321 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-cpuimx35.c b/arch/arm/mach-imx/mach-cpuimx35.c index f39a478ba1a6..68e8c7aed569 100644 --- a/arch/arm/mach-imx/mach-cpuimx35.c +++ b/arch/arm/mach-imx/mach-cpuimx35.c | |||
@@ -198,6 +198,7 @@ MACHINE_START(EUKREA_CPUIMX35, "Eukrea CPUIMX35") | |||
198 | .map_io = mx35_map_io, | 198 | .map_io = mx35_map_io, |
199 | .init_early = imx35_init_early, | 199 | .init_early = imx35_init_early, |
200 | .init_irq = mx35_init_irq, | 200 | .init_irq = mx35_init_irq, |
201 | .handle_irq = imx35_handle_irq, | ||
201 | .timer = &eukrea_cpuimx35_timer, | 202 | .timer = &eukrea_cpuimx35_timer, |
202 | .init_machine = eukrea_cpuimx35_init, | 203 | .init_machine = eukrea_cpuimx35_init, |
203 | MACHINE_END | 204 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c index da36da52969d..e2343c8594fc 100644 --- a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c +++ b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c | |||
@@ -167,6 +167,7 @@ MACHINE_START(EUKREA_CPUIMX25, "Eukrea CPUIMX25") | |||
167 | .map_io = mx25_map_io, | 167 | .map_io = mx25_map_io, |
168 | .init_early = imx25_init_early, | 168 | .init_early = imx25_init_early, |
169 | .init_irq = mx25_init_irq, | 169 | .init_irq = mx25_init_irq, |
170 | .handle_irq = imx25_handle_irq, | ||
170 | .timer = &eukrea_cpuimx25_timer, | 171 | .timer = &eukrea_cpuimx25_timer, |
171 | .init_machine = eukrea_cpuimx25_init, | 172 | .init_machine = eukrea_cpuimx25_init, |
172 | MACHINE_END | 173 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c index 6778f8193bc6..678cf831bc31 100644 --- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c +++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c | |||
@@ -279,6 +279,7 @@ MACHINE_START(IMX27_VISSTRIM_M10, "Vista Silicon Visstrim_M10") | |||
279 | .map_io = mx27_map_io, | 279 | .map_io = mx27_map_io, |
280 | .init_early = imx27_init_early, | 280 | .init_early = imx27_init_early, |
281 | .init_irq = mx27_init_irq, | 281 | .init_irq = mx27_init_irq, |
282 | .handle_irq = imx27_handle_irq, | ||
282 | .timer = &visstrim_m10_timer, | 283 | .timer = &visstrim_m10_timer, |
283 | .init_machine = visstrim_m10_board_init, | 284 | .init_machine = visstrim_m10_board_init, |
284 | MACHINE_END | 285 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-imx27ipcam.c b/arch/arm/mach-imx/mach-imx27ipcam.c index 272f793e9247..f572ce943947 100644 --- a/arch/arm/mach-imx/mach-imx27ipcam.c +++ b/arch/arm/mach-imx/mach-imx27ipcam.c | |||
@@ -75,6 +75,7 @@ MACHINE_START(IMX27IPCAM, "Freescale IMX27IPCAM") | |||
75 | .map_io = mx27_map_io, | 75 | .map_io = mx27_map_io, |
76 | .init_early = imx27_init_early, | 76 | .init_early = imx27_init_early, |
77 | .init_irq = mx27_init_irq, | 77 | .init_irq = mx27_init_irq, |
78 | .handle_irq = imx27_handle_irq, | ||
78 | .timer = &mx27ipcam_timer, | 79 | .timer = &mx27ipcam_timer, |
79 | .init_machine = mx27ipcam_init, | 80 | .init_machine = mx27ipcam_init, |
80 | MACHINE_END | 81 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-imx27lite.c b/arch/arm/mach-imx/mach-imx27lite.c index d81a769fe895..e7fc4f044946 100644 --- a/arch/arm/mach-imx/mach-imx27lite.c +++ b/arch/arm/mach-imx/mach-imx27lite.c | |||
@@ -81,6 +81,7 @@ MACHINE_START(IMX27LITE, "LogicPD i.MX27LITE") | |||
81 | .map_io = mx27_map_io, | 81 | .map_io = mx27_map_io, |
82 | .init_early = imx27_init_early, | 82 | .init_early = imx27_init_early, |
83 | .init_irq = mx27_init_irq, | 83 | .init_irq = mx27_init_irq, |
84 | .handle_irq = imx27_handle_irq, | ||
84 | .timer = &mx27lite_timer, | 85 | .timer = &mx27lite_timer, |
85 | .init_machine = mx27lite_init, | 86 | .init_machine = mx27lite_init, |
86 | MACHINE_END | 87 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-kzm_arm11_01.c b/arch/arm/mach-imx/mach-kzm_arm11_01.c index e472a1d88058..a65d91048348 100644 --- a/arch/arm/mach-imx/mach-kzm_arm11_01.c +++ b/arch/arm/mach-imx/mach-kzm_arm11_01.c | |||
@@ -275,6 +275,7 @@ MACHINE_START(KZM_ARM11_01, "Kyoto Microcomputer Co., Ltd. KZM-ARM11-01") | |||
275 | .map_io = kzm_map_io, | 275 | .map_io = kzm_map_io, |
276 | .init_early = imx31_init_early, | 276 | .init_early = imx31_init_early, |
277 | .init_irq = mx31_init_irq, | 277 | .init_irq = mx31_init_irq, |
278 | .handle_irq = imx31_handle_irq, | ||
278 | .timer = &kzm_timer, | 279 | .timer = &kzm_timer, |
279 | .init_machine = kzm_board_init, | 280 | .init_machine = kzm_board_init, |
280 | MACHINE_END | 281 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx1ads.c b/arch/arm/mach-imx/mach-mx1ads.c index 5cd8bee46960..842859c22de7 100644 --- a/arch/arm/mach-imx/mach-mx1ads.c +++ b/arch/arm/mach-imx/mach-mx1ads.c | |||
@@ -149,6 +149,7 @@ MACHINE_START(MX1ADS, "Freescale MX1ADS") | |||
149 | .map_io = mx1_map_io, | 149 | .map_io = mx1_map_io, |
150 | .init_early = imx1_init_early, | 150 | .init_early = imx1_init_early, |
151 | .init_irq = mx1_init_irq, | 151 | .init_irq = mx1_init_irq, |
152 | .handle_irq = imx1_handle_irq, | ||
152 | .timer = &mx1ads_timer, | 153 | .timer = &mx1ads_timer, |
153 | .init_machine = mx1ads_init, | 154 | .init_machine = mx1ads_init, |
154 | MACHINE_END | 155 | MACHINE_END |
@@ -158,6 +159,7 @@ MACHINE_START(MXLADS, "Freescale MXLADS") | |||
158 | .map_io = mx1_map_io, | 159 | .map_io = mx1_map_io, |
159 | .init_early = imx1_init_early, | 160 | .init_early = imx1_init_early, |
160 | .init_irq = mx1_init_irq, | 161 | .init_irq = mx1_init_irq, |
162 | .handle_irq = imx1_handle_irq, | ||
161 | .timer = &mx1ads_timer, | 163 | .timer = &mx1ads_timer, |
162 | .init_machine = mx1ads_init, | 164 | .init_machine = mx1ads_init, |
163 | MACHINE_END | 165 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx21ads.c b/arch/arm/mach-imx/mach-mx21ads.c index d389ecf9b5a8..43dd22b768e0 100644 --- a/arch/arm/mach-imx/mach-mx21ads.c +++ b/arch/arm/mach-imx/mach-mx21ads.c | |||
@@ -309,6 +309,7 @@ MACHINE_START(MX21ADS, "Freescale i.MX21ADS") | |||
309 | .map_io = mx21ads_map_io, | 309 | .map_io = mx21ads_map_io, |
310 | .init_early = imx21_init_early, | 310 | .init_early = imx21_init_early, |
311 | .init_irq = mx21_init_irq, | 311 | .init_irq = mx21_init_irq, |
312 | .handle_irq = imx21_handle_irq, | ||
312 | .timer = &mx21ads_timer, | 313 | .timer = &mx21ads_timer, |
313 | .init_machine = mx21ads_board_init, | 314 | .init_machine = mx21ads_board_init, |
314 | MACHINE_END | 315 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx25_3ds.c b/arch/arm/mach-imx/mach-mx25_3ds.c index aae2d8ce3c4d..bd735ad6675e 100644 --- a/arch/arm/mach-imx/mach-mx25_3ds.c +++ b/arch/arm/mach-imx/mach-mx25_3ds.c | |||
@@ -267,6 +267,7 @@ MACHINE_START(MX25_3DS, "Freescale MX25PDK (3DS)") | |||
267 | .map_io = mx25_map_io, | 267 | .map_io = mx25_map_io, |
268 | .init_early = imx25_init_early, | 268 | .init_early = imx25_init_early, |
269 | .init_irq = mx25_init_irq, | 269 | .init_irq = mx25_init_irq, |
270 | .handle_irq = imx25_handle_irq, | ||
270 | .timer = &mx25pdk_timer, | 271 | .timer = &mx25pdk_timer, |
271 | .init_machine = mx25pdk_init, | 272 | .init_machine = mx25pdk_init, |
272 | MACHINE_END | 273 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c index 6fa6934ab150..ad7f24fdb9d7 100644 --- a/arch/arm/mach-imx/mach-mx27_3ds.c +++ b/arch/arm/mach-imx/mach-mx27_3ds.c | |||
@@ -425,6 +425,7 @@ MACHINE_START(MX27_3DS, "Freescale MX27PDK") | |||
425 | .map_io = mx27_map_io, | 425 | .map_io = mx27_map_io, |
426 | .init_early = imx27_init_early, | 426 | .init_early = imx27_init_early, |
427 | .init_irq = mx27_init_irq, | 427 | .init_irq = mx27_init_irq, |
428 | .handle_irq = imx27_handle_irq, | ||
428 | .timer = &mx27pdk_timer, | 429 | .timer = &mx27pdk_timer, |
429 | .init_machine = mx27pdk_init, | 430 | .init_machine = mx27pdk_init, |
430 | MACHINE_END | 431 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx27ads.c b/arch/arm/mach-imx/mach-mx27ads.c index fc26ed71b9ed..e6d132108b2b 100644 --- a/arch/arm/mach-imx/mach-mx27ads.c +++ b/arch/arm/mach-imx/mach-mx27ads.c | |||
@@ -349,6 +349,7 @@ MACHINE_START(MX27ADS, "Freescale i.MX27ADS") | |||
349 | .map_io = mx27ads_map_io, | 349 | .map_io = mx27ads_map_io, |
350 | .init_early = imx27_init_early, | 350 | .init_early = imx27_init_early, |
351 | .init_irq = mx27_init_irq, | 351 | .init_irq = mx27_init_irq, |
352 | .handle_irq = imx27_handle_irq, | ||
352 | .timer = &mx27ads_timer, | 353 | .timer = &mx27ads_timer, |
353 | .init_machine = mx27ads_board_init, | 354 | .init_machine = mx27ads_board_init, |
354 | MACHINE_END | 355 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx31_3ds.c b/arch/arm/mach-imx/mach-mx31_3ds.c index c20be7530927..b4aa9c35bb45 100644 --- a/arch/arm/mach-imx/mach-mx31_3ds.c +++ b/arch/arm/mach-imx/mach-mx31_3ds.c | |||
@@ -768,6 +768,7 @@ MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)") | |||
768 | .map_io = mx31_map_io, | 768 | .map_io = mx31_map_io, |
769 | .init_early = imx31_init_early, | 769 | .init_early = imx31_init_early, |
770 | .init_irq = mx31_init_irq, | 770 | .init_irq = mx31_init_irq, |
771 | .handle_irq = imx31_handle_irq, | ||
771 | .timer = &mx31_3ds_timer, | 772 | .timer = &mx31_3ds_timer, |
772 | .init_machine = mx31_3ds_init, | 773 | .init_machine = mx31_3ds_init, |
773 | .reserve = mx31_3ds_reserve, | 774 | .reserve = mx31_3ds_reserve, |
diff --git a/arch/arm/mach-imx/mach-mx31ads.c b/arch/arm/mach-imx/mach-mx31ads.c index 29ca8907a780..13e7347e14d4 100644 --- a/arch/arm/mach-imx/mach-mx31ads.c +++ b/arch/arm/mach-imx/mach-mx31ads.c | |||
@@ -539,6 +539,7 @@ MACHINE_START(MX31ADS, "Freescale MX31ADS") | |||
539 | .map_io = mx31ads_map_io, | 539 | .map_io = mx31ads_map_io, |
540 | .init_early = imx31_init_early, | 540 | .init_early = imx31_init_early, |
541 | .init_irq = mx31ads_init_irq, | 541 | .init_irq = mx31ads_init_irq, |
542 | .handle_irq = imx31_handle_irq, | ||
542 | .timer = &mx31ads_timer, | 543 | .timer = &mx31ads_timer, |
543 | .init_machine = mx31ads_init, | 544 | .init_machine = mx31ads_init, |
544 | MACHINE_END | 545 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx31lilly.c b/arch/arm/mach-imx/mach-mx31lilly.c index 126913ad106a..070a8d1f40cc 100644 --- a/arch/arm/mach-imx/mach-mx31lilly.c +++ b/arch/arm/mach-imx/mach-mx31lilly.c | |||
@@ -299,6 +299,7 @@ MACHINE_START(LILLY1131, "INCO startec LILLY-1131") | |||
299 | .map_io = mx31_map_io, | 299 | .map_io = mx31_map_io, |
300 | .init_early = imx31_init_early, | 300 | .init_early = imx31_init_early, |
301 | .init_irq = mx31_init_irq, | 301 | .init_irq = mx31_init_irq, |
302 | .handle_irq = imx31_handle_irq, | ||
302 | .timer = &mx31lilly_timer, | 303 | .timer = &mx31lilly_timer, |
303 | .init_machine = mx31lilly_board_init, | 304 | .init_machine = mx31lilly_board_init, |
304 | MACHINE_END | 305 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx31lite.c b/arch/arm/mach-imx/mach-mx31lite.c index 4b47fd9fdd89..4f66ea440742 100644 --- a/arch/arm/mach-imx/mach-mx31lite.c +++ b/arch/arm/mach-imx/mach-mx31lite.c | |||
@@ -284,6 +284,7 @@ MACHINE_START(MX31LITE, "LogicPD i.MX31 SOM") | |||
284 | .map_io = mx31lite_map_io, | 284 | .map_io = mx31lite_map_io, |
285 | .init_early = imx31_init_early, | 285 | .init_early = imx31_init_early, |
286 | .init_irq = mx31_init_irq, | 286 | .init_irq = mx31_init_irq, |
287 | .handle_irq = imx31_handle_irq, | ||
287 | .timer = &mx31lite_timer, | 288 | .timer = &mx31lite_timer, |
288 | .init_machine = mx31lite_init, | 289 | .init_machine = mx31lite_init, |
289 | MACHINE_END | 290 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c index b358383120e7..cd07ebe9b9d8 100644 --- a/arch/arm/mach-imx/mach-mx31moboard.c +++ b/arch/arm/mach-imx/mach-mx31moboard.c | |||
@@ -28,6 +28,9 @@ | |||
28 | #include <linux/spi/spi.h> | 28 | #include <linux/spi/spi.h> |
29 | #include <linux/types.h> | 29 | #include <linux/types.h> |
30 | #include <linux/memblock.h> | 30 | #include <linux/memblock.h> |
31 | #include <linux/clk.h> | ||
32 | #include <linux/io.h> | ||
33 | #include <linux/err.h> | ||
31 | 34 | ||
32 | #include <linux/usb/otg.h> | 35 | #include <linux/usb/otg.h> |
33 | #include <linux/usb/ulpi.h> | 36 | #include <linux/usb/ulpi.h> |
@@ -490,6 +493,18 @@ err: | |||
490 | 493 | ||
491 | } | 494 | } |
492 | 495 | ||
496 | static void mx31moboard_poweroff(void) | ||
497 | { | ||
498 | struct clk *clk = clk_get_sys("imx2-wdt.0", NULL); | ||
499 | |||
500 | if (!IS_ERR(clk)) | ||
501 | clk_enable(clk); | ||
502 | |||
503 | mxc_iomux_mode(MX31_PIN_WATCHDOG_RST__WATCHDOG_RST); | ||
504 | |||
505 | __raw_writew(1 << 6 | 1 << 2, MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR)); | ||
506 | } | ||
507 | |||
493 | static int mx31moboard_baseboard; | 508 | static int mx31moboard_baseboard; |
494 | core_param(mx31moboard_baseboard, mx31moboard_baseboard, int, 0444); | 509 | core_param(mx31moboard_baseboard, mx31moboard_baseboard, int, 0444); |
495 | 510 | ||
@@ -528,6 +543,8 @@ static void __init mx31moboard_init(void) | |||
528 | 543 | ||
529 | moboard_usbh2_init(); | 544 | moboard_usbh2_init(); |
530 | 545 | ||
546 | pm_power_off = mx31moboard_poweroff; | ||
547 | |||
531 | switch (mx31moboard_baseboard) { | 548 | switch (mx31moboard_baseboard) { |
532 | case MX31NOBOARD: | 549 | case MX31NOBOARD: |
533 | break; | 550 | break; |
@@ -572,6 +589,7 @@ MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard") | |||
572 | .map_io = mx31_map_io, | 589 | .map_io = mx31_map_io, |
573 | .init_early = imx31_init_early, | 590 | .init_early = imx31_init_early, |
574 | .init_irq = mx31_init_irq, | 591 | .init_irq = mx31_init_irq, |
592 | .handle_irq = imx31_handle_irq, | ||
575 | .timer = &mx31moboard_timer, | 593 | .timer = &mx31moboard_timer, |
576 | .init_machine = mx31moboard_init, | 594 | .init_machine = mx31moboard_init, |
577 | MACHINE_END | 595 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c b/arch/arm/mach-imx/mach-mx35_3ds.c index b3b9bd8ac2a3..5a5eb3e0f737 100644 --- a/arch/arm/mach-imx/mach-mx35_3ds.c +++ b/arch/arm/mach-imx/mach-mx35_3ds.c | |||
@@ -221,6 +221,7 @@ MACHINE_START(MX35_3DS, "Freescale MX35PDK") | |||
221 | .map_io = mx35_map_io, | 221 | .map_io = mx35_map_io, |
222 | .init_early = imx35_init_early, | 222 | .init_early = imx35_init_early, |
223 | .init_irq = mx35_init_irq, | 223 | .init_irq = mx35_init_irq, |
224 | .handle_irq = imx35_handle_irq, | ||
224 | .timer = &mx35pdk_timer, | 225 | .timer = &mx35pdk_timer, |
225 | .init_machine = mx35_3ds_init, | 226 | .init_machine = mx35_3ds_init, |
226 | MACHINE_END | 227 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mxt_td60.c b/arch/arm/mach-imx/mach-mxt_td60.c index c85876fed663..d01a92f71006 100644 --- a/arch/arm/mach-imx/mach-mxt_td60.c +++ b/arch/arm/mach-imx/mach-mxt_td60.c | |||
@@ -271,6 +271,7 @@ MACHINE_START(MXT_TD60, "Maxtrack i-MXT TD60") | |||
271 | .map_io = mx27_map_io, | 271 | .map_io = mx27_map_io, |
272 | .init_early = imx27_init_early, | 272 | .init_early = imx27_init_early, |
273 | .init_irq = mx27_init_irq, | 273 | .init_irq = mx27_init_irq, |
274 | .handle_irq = imx27_handle_irq, | ||
274 | .timer = &mxt_td60_timer, | 275 | .timer = &mxt_td60_timer, |
275 | .init_machine = mxt_td60_board_init, | 276 | .init_machine = mxt_td60_board_init, |
276 | MACHINE_END | 277 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c index 71083aa16038..100babc71875 100644 --- a/arch/arm/mach-imx/mach-pca100.c +++ b/arch/arm/mach-imx/mach-pca100.c | |||
@@ -439,6 +439,7 @@ MACHINE_START(PCA100, "phyCARD-i.MX27") | |||
439 | .map_io = mx27_map_io, | 439 | .map_io = mx27_map_io, |
440 | .init_early = imx27_init_early, | 440 | .init_early = imx27_init_early, |
441 | .init_irq = mx27_init_irq, | 441 | .init_irq = mx27_init_irq, |
442 | .handle_irq = imx27_handle_irq, | ||
442 | .init_machine = pca100_init, | 443 | .init_machine = pca100_init, |
443 | .timer = &pca100_timer, | 444 | .timer = &pca100_timer, |
444 | MACHINE_END | 445 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-pcm037.c b/arch/arm/mach-imx/mach-pcm037.c index f45b7cd72c8a..3fb5eaa8248a 100644 --- a/arch/arm/mach-imx/mach-pcm037.c +++ b/arch/arm/mach-imx/mach-pcm037.c | |||
@@ -693,6 +693,7 @@ MACHINE_START(PCM037, "Phytec Phycore pcm037") | |||
693 | .map_io = mx31_map_io, | 693 | .map_io = mx31_map_io, |
694 | .init_early = imx31_init_early, | 694 | .init_early = imx31_init_early, |
695 | .init_irq = mx31_init_irq, | 695 | .init_irq = mx31_init_irq, |
696 | .handle_irq = imx31_handle_irq, | ||
696 | .timer = &pcm037_timer, | 697 | .timer = &pcm037_timer, |
697 | .init_machine = pcm037_init, | 698 | .init_machine = pcm037_init, |
698 | MACHINE_END | 699 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-pcm038.c b/arch/arm/mach-imx/mach-pcm038.c index 2d6a64bbac44..dac2b790df06 100644 --- a/arch/arm/mach-imx/mach-pcm038.c +++ b/arch/arm/mach-imx/mach-pcm038.c | |||
@@ -353,6 +353,7 @@ MACHINE_START(PCM038, "phyCORE-i.MX27") | |||
353 | .map_io = mx27_map_io, | 353 | .map_io = mx27_map_io, |
354 | .init_early = imx27_init_early, | 354 | .init_early = imx27_init_early, |
355 | .init_irq = mx27_init_irq, | 355 | .init_irq = mx27_init_irq, |
356 | .handle_irq = imx27_handle_irq, | ||
356 | .timer = &pcm038_timer, | 357 | .timer = &pcm038_timer, |
357 | .init_machine = pcm038_init, | 358 | .init_machine = pcm038_init, |
358 | MACHINE_END | 359 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-pcm043.c b/arch/arm/mach-imx/mach-pcm043.c index 660ec3e80cf8..a27baa493ced 100644 --- a/arch/arm/mach-imx/mach-pcm043.c +++ b/arch/arm/mach-imx/mach-pcm043.c | |||
@@ -422,6 +422,7 @@ MACHINE_START(PCM043, "Phytec Phycore pcm043") | |||
422 | .map_io = mx35_map_io, | 422 | .map_io = mx35_map_io, |
423 | .init_early = imx35_init_early, | 423 | .init_early = imx35_init_early, |
424 | .init_irq = mx35_init_irq, | 424 | .init_irq = mx35_init_irq, |
425 | .handle_irq = imx35_handle_irq, | ||
425 | .timer = &pcm043_timer, | 426 | .timer = &pcm043_timer, |
426 | .init_machine = pcm043_init, | 427 | .init_machine = pcm043_init, |
427 | MACHINE_END | 428 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-qong.c b/arch/arm/mach-imx/mach-qong.c index 3626f486498a..4243d1f548c2 100644 --- a/arch/arm/mach-imx/mach-qong.c +++ b/arch/arm/mach-imx/mach-qong.c | |||
@@ -249,6 +249,7 @@ static void __init qong_init(void) | |||
249 | mxc_init_imx_uart(); | 249 | mxc_init_imx_uart(); |
250 | qong_init_nor_mtd(); | 250 | qong_init_nor_mtd(); |
251 | qong_init_fpga(); | 251 | qong_init_fpga(); |
252 | imx31_add_imx2_wdt(NULL); | ||
252 | } | 253 | } |
253 | 254 | ||
254 | static void __init qong_timer_init(void) | 255 | static void __init qong_timer_init(void) |
@@ -266,6 +267,7 @@ MACHINE_START(QONG, "Dave/DENX QongEVB-LITE") | |||
266 | .map_io = mx31_map_io, | 267 | .map_io = mx31_map_io, |
267 | .init_early = imx31_init_early, | 268 | .init_early = imx31_init_early, |
268 | .init_irq = mx31_init_irq, | 269 | .init_irq = mx31_init_irq, |
270 | .handle_irq = imx31_handle_irq, | ||
269 | .timer = &qong_timer, | 271 | .timer = &qong_timer, |
270 | .init_machine = qong_init, | 272 | .init_machine = qong_init, |
271 | MACHINE_END | 273 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-scb9328.c b/arch/arm/mach-imx/mach-scb9328.c index db2d60470e15..17f15fb57e1c 100644 --- a/arch/arm/mach-imx/mach-scb9328.c +++ b/arch/arm/mach-imx/mach-scb9328.c | |||
@@ -141,6 +141,7 @@ MACHINE_START(SCB9328, "Synertronixx scb9328") | |||
141 | .map_io = mx1_map_io, | 141 | .map_io = mx1_map_io, |
142 | .init_early = imx1_init_early, | 142 | .init_early = imx1_init_early, |
143 | .init_irq = mx1_init_irq, | 143 | .init_irq = mx1_init_irq, |
144 | .handle_irq = imx1_handle_irq, | ||
144 | .timer = &scb9328_timer, | 145 | .timer = &scb9328_timer, |
145 | .init_machine = scb9328_init, | 146 | .init_machine = scb9328_init, |
146 | MACHINE_END | 147 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-vpr200.c b/arch/arm/mach-imx/mach-vpr200.c index 7d8e012a6335..4f310b38924d 100644 --- a/arch/arm/mach-imx/mach-vpr200.c +++ b/arch/arm/mach-imx/mach-vpr200.c | |||
@@ -319,6 +319,7 @@ MACHINE_START(VPR200, "VPR200") | |||
319 | .map_io = mx35_map_io, | 319 | .map_io = mx35_map_io, |
320 | .init_early = imx35_init_early, | 320 | .init_early = imx35_init_early, |
321 | .init_irq = mx35_init_irq, | 321 | .init_irq = mx35_init_irq, |
322 | .handle_irq = imx35_handle_irq, | ||
322 | .timer = &vpr200_timer, | 323 | .timer = &vpr200_timer, |
323 | .init_machine = vpr200_board_init, | 324 | .init_machine = vpr200_board_init, |
324 | MACHINE_END | 325 | MACHINE_END |
diff --git a/arch/arm/mach-mx5/board-cpuimx51.c b/arch/arm/mach-mx5/board-cpuimx51.c index 68934ea8725a..a7a6682560b7 100644 --- a/arch/arm/mach-mx5/board-cpuimx51.c +++ b/arch/arm/mach-mx5/board-cpuimx51.c | |||
@@ -297,6 +297,7 @@ MACHINE_START(EUKREA_CPUIMX51, "Eukrea CPUIMX51 Module") | |||
297 | .map_io = mx51_map_io, | 297 | .map_io = mx51_map_io, |
298 | .init_early = imx51_init_early, | 298 | .init_early = imx51_init_early, |
299 | .init_irq = mx51_init_irq, | 299 | .init_irq = mx51_init_irq, |
300 | .handle_irq = imx51_handle_irq, | ||
300 | .timer = &mxc_timer, | 301 | .timer = &mxc_timer, |
301 | .init_machine = eukrea_cpuimx51_init, | 302 | .init_machine = eukrea_cpuimx51_init, |
302 | MACHINE_END | 303 | MACHINE_END |
diff --git a/arch/arm/mach-mx5/board-cpuimx51sd.c b/arch/arm/mach-mx5/board-cpuimx51sd.c index ff096d587299..06beec10a811 100644 --- a/arch/arm/mach-mx5/board-cpuimx51sd.c +++ b/arch/arm/mach-mx5/board-cpuimx51sd.c | |||
@@ -335,6 +335,7 @@ MACHINE_START(EUKREA_CPUIMX51SD, "Eukrea CPUIMX51SD") | |||
335 | .map_io = mx51_map_io, | 335 | .map_io = mx51_map_io, |
336 | .init_early = imx51_init_early, | 336 | .init_early = imx51_init_early, |
337 | .init_irq = mx51_init_irq, | 337 | .init_irq = mx51_init_irq, |
338 | .handle_irq = imx51_handle_irq, | ||
338 | .timer = &mxc_timer, | 339 | .timer = &mxc_timer, |
339 | .init_machine = eukrea_cpuimx51sd_init, | 340 | .init_machine = eukrea_cpuimx51sd_init, |
340 | MACHINE_END | 341 | MACHINE_END |
diff --git a/arch/arm/mach-mx5/board-mx50_rdp.c b/arch/arm/mach-mx5/board-mx50_rdp.c index 7de25c6712eb..fc3621d90bde 100644 --- a/arch/arm/mach-mx5/board-mx50_rdp.c +++ b/arch/arm/mach-mx5/board-mx50_rdp.c | |||
@@ -219,6 +219,7 @@ MACHINE_START(MX50_RDP, "Freescale MX50 Reference Design Platform") | |||
219 | .map_io = mx50_map_io, | 219 | .map_io = mx50_map_io, |
220 | .init_early = imx50_init_early, | 220 | .init_early = imx50_init_early, |
221 | .init_irq = mx50_init_irq, | 221 | .init_irq = mx50_init_irq, |
222 | .handle_irq = imx50_handle_irq, | ||
222 | .timer = &mx50_rdp_timer, | 223 | .timer = &mx50_rdp_timer, |
223 | .init_machine = mx50_rdp_board_init, | 224 | .init_machine = mx50_rdp_board_init, |
224 | MACHINE_END | 225 | MACHINE_END |
diff --git a/arch/arm/mach-mx5/board-mx51_3ds.c b/arch/arm/mach-mx5/board-mx51_3ds.c index 07a38154da21..5f4a168e30ba 100644 --- a/arch/arm/mach-mx5/board-mx51_3ds.c +++ b/arch/arm/mach-mx5/board-mx51_3ds.c | |||
@@ -173,6 +173,7 @@ MACHINE_START(MX51_3DS, "Freescale MX51 3-Stack Board") | |||
173 | .map_io = mx51_map_io, | 173 | .map_io = mx51_map_io, |
174 | .init_early = imx51_init_early, | 174 | .init_early = imx51_init_early, |
175 | .init_irq = mx51_init_irq, | 175 | .init_irq = mx51_init_irq, |
176 | .handle_irq = imx51_handle_irq, | ||
176 | .timer = &mx51_3ds_timer, | 177 | .timer = &mx51_3ds_timer, |
177 | .init_machine = mx51_3ds_init, | 178 | .init_machine = mx51_3ds_init, |
178 | MACHINE_END | 179 | MACHINE_END |
diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c index 11b0ff67f89d..4bd5e87195b0 100644 --- a/arch/arm/mach-mx5/board-mx51_babbage.c +++ b/arch/arm/mach-mx5/board-mx51_babbage.c | |||
@@ -420,6 +420,7 @@ MACHINE_START(MX51_BABBAGE, "Freescale MX51 Babbage Board") | |||
420 | .map_io = mx51_map_io, | 420 | .map_io = mx51_map_io, |
421 | .init_early = imx51_init_early, | 421 | .init_early = imx51_init_early, |
422 | .init_irq = mx51_init_irq, | 422 | .init_irq = mx51_init_irq, |
423 | .handle_irq = imx51_handle_irq, | ||
423 | .timer = &mx51_babbage_timer, | 424 | .timer = &mx51_babbage_timer, |
424 | .init_machine = mx51_babbage_init, | 425 | .init_machine = mx51_babbage_init, |
425 | MACHINE_END | 426 | MACHINE_END |
diff --git a/arch/arm/mach-mx5/board-mx51_efikamx.c b/arch/arm/mach-mx5/board-mx51_efikamx.c index 551daf85ff8c..1c2b5e71931a 100644 --- a/arch/arm/mach-mx5/board-mx51_efikamx.c +++ b/arch/arm/mach-mx5/board-mx51_efikamx.c | |||
@@ -163,6 +163,11 @@ static const struct gpio_led_platform_data | |||
163 | .num_leds = ARRAY_SIZE(mx51_efikamx_leds), | 163 | .num_leds = ARRAY_SIZE(mx51_efikamx_leds), |
164 | }; | 164 | }; |
165 | 165 | ||
166 | static struct esdhc_platform_data sd_pdata = { | ||
167 | .cd_type = ESDHC_CD_CONTROLLER, | ||
168 | .wp_type = ESDHC_WP_CONTROLLER, | ||
169 | }; | ||
170 | |||
166 | static struct gpio_keys_button mx51_efikamx_powerkey[] = { | 171 | static struct gpio_keys_button mx51_efikamx_powerkey[] = { |
167 | { | 172 | { |
168 | .code = KEY_POWER, | 173 | .code = KEY_POWER, |
@@ -239,9 +244,11 @@ static void __init mx51_efikamx_init(void) | |||
239 | 244 | ||
240 | /* on < 1.2 boards both SD controllers are used */ | 245 | /* on < 1.2 boards both SD controllers are used */ |
241 | if (system_rev < 0x12) { | 246 | if (system_rev < 0x12) { |
242 | imx51_add_sdhci_esdhc_imx(1, NULL); | 247 | imx51_add_sdhci_esdhc_imx(0, NULL); |
248 | imx51_add_sdhci_esdhc_imx(1, &sd_pdata); | ||
243 | mx51_efikamx_leds[2].default_trigger = "mmc1"; | 249 | mx51_efikamx_leds[2].default_trigger = "mmc1"; |
244 | } | 250 | } else |
251 | imx51_add_sdhci_esdhc_imx(0, &sd_pdata); | ||
245 | 252 | ||
246 | gpio_led_register_device(-1, &mx51_efikamx_leds_data); | 253 | gpio_led_register_device(-1, &mx51_efikamx_leds_data); |
247 | imx_add_gpio_keys(&mx51_efikamx_powerkey_data); | 254 | imx_add_gpio_keys(&mx51_efikamx_powerkey_data); |
@@ -284,6 +291,7 @@ MACHINE_START(MX51_EFIKAMX, "Genesi EfikaMX nettop") | |||
284 | .map_io = mx51_map_io, | 291 | .map_io = mx51_map_io, |
285 | .init_early = imx51_init_early, | 292 | .init_early = imx51_init_early, |
286 | .init_irq = mx51_init_irq, | 293 | .init_irq = mx51_init_irq, |
294 | .handle_irq = imx51_handle_irq, | ||
287 | .timer = &mx51_efikamx_timer, | 295 | .timer = &mx51_efikamx_timer, |
288 | .init_machine = mx51_efikamx_init, | 296 | .init_machine = mx51_efikamx_init, |
289 | MACHINE_END | 297 | MACHINE_END |
diff --git a/arch/arm/mach-mx5/board-mx51_efikasb.c b/arch/arm/mach-mx5/board-mx51_efikasb.c index 8a9bca22beb5..b491513e272b 100644 --- a/arch/arm/mach-mx5/board-mx51_efikasb.c +++ b/arch/arm/mach-mx5/board-mx51_efikasb.c | |||
@@ -56,6 +56,7 @@ | |||
56 | #define EFIKASB_RFKILL IMX_GPIO_NR(3, 1) | 56 | #define EFIKASB_RFKILL IMX_GPIO_NR(3, 1) |
57 | 57 | ||
58 | #define MX51_PAD_PWRKEY IOMUX_PAD(0x48c, 0x0f8, 1, 0x0, 0, PAD_CTL_PUS_100K_UP | PAD_CTL_PKE) | 58 | #define MX51_PAD_PWRKEY IOMUX_PAD(0x48c, 0x0f8, 1, 0x0, 0, PAD_CTL_PUS_100K_UP | PAD_CTL_PKE) |
59 | #define MX51_PAD_SD1_CD IOMUX_PAD(0x47c, 0x0e8, 1, __NA_, 0, MX51_ESDHC_PAD_CTRL) | ||
59 | 60 | ||
60 | static iomux_v3_cfg_t mx51efikasb_pads[] = { | 61 | static iomux_v3_cfg_t mx51efikasb_pads[] = { |
61 | /* USB HOST2 */ | 62 | /* USB HOST2 */ |
@@ -97,6 +98,8 @@ static iomux_v3_cfg_t mx51efikasb_pads[] = { | |||
97 | 98 | ||
98 | /* BT */ | 99 | /* BT */ |
99 | MX51_PAD_EIM_A17__GPIO2_11, | 100 | MX51_PAD_EIM_A17__GPIO2_11, |
101 | |||
102 | MX51_PAD_SD1_CD, | ||
100 | }; | 103 | }; |
101 | 104 | ||
102 | static int initialize_usbh2_port(struct platform_device *pdev) | 105 | static int initialize_usbh2_port(struct platform_device *pdev) |
@@ -182,6 +185,18 @@ static const struct gpio_keys_platform_data mx51_efikasb_keys_data __initconst = | |||
182 | .nbuttons = ARRAY_SIZE(mx51_efikasb_keys), | 185 | .nbuttons = ARRAY_SIZE(mx51_efikasb_keys), |
183 | }; | 186 | }; |
184 | 187 | ||
188 | static struct esdhc_platform_data sd0_pdata = { | ||
189 | #define EFIKASB_SD1_CD IMX_GPIO_NR(2, 27) | ||
190 | .cd_gpio = EFIKASB_SD1_CD, | ||
191 | .cd_type = ESDHC_CD_GPIO, | ||
192 | .wp_type = ESDHC_WP_CONTROLLER, | ||
193 | }; | ||
194 | |||
195 | static struct esdhc_platform_data sd1_pdata = { | ||
196 | .cd_type = ESDHC_CD_CONTROLLER, | ||
197 | .wp_type = ESDHC_WP_CONTROLLER, | ||
198 | }; | ||
199 | |||
185 | static struct regulator *pwgt1, *pwgt2; | 200 | static struct regulator *pwgt1, *pwgt2; |
186 | 201 | ||
187 | static void mx51_efikasb_power_off(void) | 202 | static void mx51_efikasb_power_off(void) |
@@ -250,7 +265,8 @@ static void __init efikasb_board_init(void) | |||
250 | 265 | ||
251 | mx51_efikasb_board_id(); | 266 | mx51_efikasb_board_id(); |
252 | mx51_efikasb_usb(); | 267 | mx51_efikasb_usb(); |
253 | imx51_add_sdhci_esdhc_imx(1, NULL); | 268 | imx51_add_sdhci_esdhc_imx(0, &sd0_pdata); |
269 | imx51_add_sdhci_esdhc_imx(1, &sd1_pdata); | ||
254 | 270 | ||
255 | gpio_led_register_device(-1, &mx51_efikasb_leds_data); | 271 | gpio_led_register_device(-1, &mx51_efikasb_leds_data); |
256 | imx_add_gpio_keys(&mx51_efikasb_keys_data); | 272 | imx_add_gpio_keys(&mx51_efikasb_keys_data); |
@@ -270,6 +286,7 @@ MACHINE_START(MX51_EFIKASB, "Genesi Efika Smartbook") | |||
270 | .map_io = mx51_map_io, | 286 | .map_io = mx51_map_io, |
271 | .init_early = imx51_init_early, | 287 | .init_early = imx51_init_early, |
272 | .init_irq = mx51_init_irq, | 288 | .init_irq = mx51_init_irq, |
289 | .handle_irq = imx51_handle_irq, | ||
273 | .init_machine = efikasb_board_init, | 290 | .init_machine = efikasb_board_init, |
274 | .timer = &mx51_efikasb_timer, | 291 | .timer = &mx51_efikasb_timer, |
275 | MACHINE_END | 292 | MACHINE_END |
diff --git a/arch/arm/mach-mx5/board-mx53_ard.c b/arch/arm/mach-mx5/board-mx53_ard.c index 76a67c4a2a0b..f58ac83eea28 100644 --- a/arch/arm/mach-mx5/board-mx53_ard.c +++ b/arch/arm/mach-mx5/board-mx53_ard.c | |||
@@ -249,6 +249,7 @@ MACHINE_START(MX53_ARD, "Freescale MX53 ARD Board") | |||
249 | .map_io = mx53_map_io, | 249 | .map_io = mx53_map_io, |
250 | .init_early = imx53_init_early, | 250 | .init_early = imx53_init_early, |
251 | .init_irq = mx53_init_irq, | 251 | .init_irq = mx53_init_irq, |
252 | .handle_irq = imx53_handle_irq, | ||
252 | .timer = &mx53_ard_timer, | 253 | .timer = &mx53_ard_timer, |
253 | .init_machine = mx53_ard_board_init, | 254 | .init_machine = mx53_ard_board_init, |
254 | MACHINE_END | 255 | MACHINE_END |
diff --git a/arch/arm/mach-mx5/board-mx53_evk.c b/arch/arm/mach-mx5/board-mx53_evk.c index 1b417b06b736..6a3e6168e322 100644 --- a/arch/arm/mach-mx5/board-mx53_evk.c +++ b/arch/arm/mach-mx5/board-mx53_evk.c | |||
@@ -167,6 +167,7 @@ MACHINE_START(MX53_EVK, "Freescale MX53 EVK Board") | |||
167 | .map_io = mx53_map_io, | 167 | .map_io = mx53_map_io, |
168 | .init_early = imx53_init_early, | 168 | .init_early = imx53_init_early, |
169 | .init_irq = mx53_init_irq, | 169 | .init_irq = mx53_init_irq, |
170 | .handle_irq = imx53_handle_irq, | ||
170 | .timer = &mx53_evk_timer, | 171 | .timer = &mx53_evk_timer, |
171 | .init_machine = mx53_evk_board_init, | 172 | .init_machine = mx53_evk_board_init, |
172 | MACHINE_END | 173 | MACHINE_END |
diff --git a/arch/arm/mach-mx5/board-mx53_loco.c b/arch/arm/mach-mx5/board-mx53_loco.c index 1bb0b3c330fb..7149416d1519 100644 --- a/arch/arm/mach-mx5/board-mx53_loco.c +++ b/arch/arm/mach-mx5/board-mx53_loco.c | |||
@@ -308,6 +308,7 @@ MACHINE_START(MX53_LOCO, "Freescale MX53 LOCO Board") | |||
308 | .map_io = mx53_map_io, | 308 | .map_io = mx53_map_io, |
309 | .init_early = imx53_init_early, | 309 | .init_early = imx53_init_early, |
310 | .init_irq = mx53_init_irq, | 310 | .init_irq = mx53_init_irq, |
311 | .handle_irq = imx53_handle_irq, | ||
311 | .timer = &mx53_loco_timer, | 312 | .timer = &mx53_loco_timer, |
312 | .init_machine = mx53_loco_board_init, | 313 | .init_machine = mx53_loco_board_init, |
313 | MACHINE_END | 314 | MACHINE_END |
diff --git a/arch/arm/mach-mx5/board-mx53_smd.c b/arch/arm/mach-mx5/board-mx53_smd.c index bc02894eafef..e64fd2c088eb 100644 --- a/arch/arm/mach-mx5/board-mx53_smd.c +++ b/arch/arm/mach-mx5/board-mx53_smd.c | |||
@@ -140,6 +140,7 @@ MACHINE_START(MX53_SMD, "Freescale MX53 SMD Board") | |||
140 | .map_io = mx53_map_io, | 140 | .map_io = mx53_map_io, |
141 | .init_early = imx53_init_early, | 141 | .init_early = imx53_init_early, |
142 | .init_irq = mx53_init_irq, | 142 | .init_irq = mx53_init_irq, |
143 | .handle_irq = imx53_handle_irq, | ||
143 | .timer = &mx53_smd_timer, | 144 | .timer = &mx53_smd_timer, |
144 | .init_machine = mx53_smd_board_init, | 145 | .init_machine = mx53_smd_board_init, |
145 | MACHINE_END | 146 | MACHINE_END |
diff --git a/arch/arm/mach-mx5/mx51_efika.c b/arch/arm/mach-mx5/mx51_efika.c index 0d738fdc8a94..9dc3a869033c 100644 --- a/arch/arm/mach-mx5/mx51_efika.c +++ b/arch/arm/mach-mx5/mx51_efika.c | |||
@@ -609,7 +609,6 @@ void __init efika_board_common_init(void) | |||
609 | ARRAY_SIZE(mx51efika_pads)); | 609 | ARRAY_SIZE(mx51efika_pads)); |
610 | imx51_add_imx_uart(0, &uart_pdata); | 610 | imx51_add_imx_uart(0, &uart_pdata); |
611 | mx51_efika_usb(); | 611 | mx51_efika_usb(); |
612 | imx51_add_sdhci_esdhc_imx(0, NULL); | ||
613 | 612 | ||
614 | /* FIXME: comes from original code. check this. */ | 613 | /* FIXME: comes from original code. check this. */ |
615 | if (mx51_revision() < IMX_CHIP_REVISION_2_0) | 614 | if (mx51_revision() < IMX_CHIP_REVISION_2_0) |
diff --git a/arch/arm/plat-mxc/avic.c b/arch/arm/plat-mxc/avic.c index 55d2534ec727..8875fb415f68 100644 --- a/arch/arm/plat-mxc/avic.c +++ b/arch/arm/plat-mxc/avic.c | |||
@@ -50,6 +50,8 @@ | |||
50 | 50 | ||
51 | void __iomem *avic_base; | 51 | void __iomem *avic_base; |
52 | 52 | ||
53 | static u32 avic_saved_mask_reg[2]; | ||
54 | |||
53 | #ifdef CONFIG_MXC_IRQ_PRIOR | 55 | #ifdef CONFIG_MXC_IRQ_PRIOR |
54 | static int avic_irq_set_priority(unsigned char irq, unsigned char prio) | 56 | static int avic_irq_set_priority(unsigned char irq, unsigned char prio) |
55 | { | 57 | { |
@@ -90,24 +92,8 @@ static int avic_set_irq_fiq(unsigned int irq, unsigned int type) | |||
90 | } | 92 | } |
91 | #endif /* CONFIG_FIQ */ | 93 | #endif /* CONFIG_FIQ */ |
92 | 94 | ||
93 | /* Disable interrupt number "irq" in the AVIC */ | ||
94 | static void mxc_mask_irq(struct irq_data *d) | ||
95 | { | ||
96 | __raw_writel(d->irq, avic_base + AVIC_INTDISNUM); | ||
97 | } | ||
98 | 95 | ||
99 | /* Enable interrupt number "irq" in the AVIC */ | 96 | static struct mxc_extra_irq avic_extra_irq = { |
100 | static void mxc_unmask_irq(struct irq_data *d) | ||
101 | { | ||
102 | __raw_writel(d->irq, avic_base + AVIC_INTENNUM); | ||
103 | } | ||
104 | |||
105 | static struct mxc_irq_chip mxc_avic_chip = { | ||
106 | .base = { | ||
107 | .irq_ack = mxc_mask_irq, | ||
108 | .irq_mask = mxc_mask_irq, | ||
109 | .irq_unmask = mxc_unmask_irq, | ||
110 | }, | ||
111 | #ifdef CONFIG_MXC_IRQ_PRIOR | 97 | #ifdef CONFIG_MXC_IRQ_PRIOR |
112 | .set_priority = avic_irq_set_priority, | 98 | .set_priority = avic_irq_set_priority, |
113 | #endif | 99 | #endif |
@@ -116,6 +102,68 @@ static struct mxc_irq_chip mxc_avic_chip = { | |||
116 | #endif | 102 | #endif |
117 | }; | 103 | }; |
118 | 104 | ||
105 | #ifdef CONFIG_PM | ||
106 | static void avic_irq_suspend(struct irq_data *d) | ||
107 | { | ||
108 | struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d); | ||
109 | struct irq_chip_type *ct = gc->chip_types; | ||
110 | int idx = gc->irq_base >> 5; | ||
111 | |||
112 | avic_saved_mask_reg[idx] = __raw_readl(avic_base + ct->regs.mask); | ||
113 | __raw_writel(gc->wake_active, avic_base + ct->regs.mask); | ||
114 | } | ||
115 | |||
116 | static void avic_irq_resume(struct irq_data *d) | ||
117 | { | ||
118 | struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d); | ||
119 | struct irq_chip_type *ct = gc->chip_types; | ||
120 | int idx = gc->irq_base >> 5; | ||
121 | |||
122 | __raw_writel(avic_saved_mask_reg[idx], avic_base + ct->regs.mask); | ||
123 | } | ||
124 | |||
125 | #else | ||
126 | #define avic_irq_suspend NULL | ||
127 | #define avic_irq_resume NULL | ||
128 | #endif | ||
129 | |||
130 | static __init void avic_init_gc(unsigned int irq_start) | ||
131 | { | ||
132 | struct irq_chip_generic *gc; | ||
133 | struct irq_chip_type *ct; | ||
134 | int idx = irq_start >> 5; | ||
135 | |||
136 | gc = irq_alloc_generic_chip("mxc-avic", 1, irq_start, avic_base, | ||
137 | handle_level_irq); | ||
138 | gc->private = &avic_extra_irq; | ||
139 | gc->wake_enabled = IRQ_MSK(32); | ||
140 | |||
141 | ct = gc->chip_types; | ||
142 | ct->chip.irq_mask = irq_gc_mask_clr_bit; | ||
143 | ct->chip.irq_unmask = irq_gc_mask_set_bit; | ||
144 | ct->chip.irq_ack = irq_gc_mask_clr_bit; | ||
145 | ct->chip.irq_set_wake = irq_gc_set_wake; | ||
146 | ct->chip.irq_suspend = avic_irq_suspend; | ||
147 | ct->chip.irq_resume = avic_irq_resume; | ||
148 | ct->regs.mask = !idx ? AVIC_INTENABLEL : AVIC_INTENABLEH; | ||
149 | ct->regs.ack = ct->regs.mask; | ||
150 | |||
151 | irq_setup_generic_chip(gc, IRQ_MSK(32), 0, IRQ_NOREQUEST, 0); | ||
152 | } | ||
153 | |||
154 | asmlinkage void __exception_irq_entry avic_handle_irq(struct pt_regs *regs) | ||
155 | { | ||
156 | u32 nivector; | ||
157 | |||
158 | do { | ||
159 | nivector = __raw_readl(avic_base + AVIC_NIVECSR) >> 16; | ||
160 | if (nivector == 0xffff) | ||
161 | break; | ||
162 | |||
163 | handle_IRQ(nivector, regs); | ||
164 | } while (1); | ||
165 | } | ||
166 | |||
119 | /* | 167 | /* |
120 | * This function initializes the AVIC hardware and disables all the | 168 | * This function initializes the AVIC hardware and disables all the |
121 | * interrupts. It registers the interrupt enable and disable functions | 169 | * interrupts. It registers the interrupt enable and disable functions |
@@ -140,11 +188,9 @@ void __init mxc_init_irq(void __iomem *irqbase) | |||
140 | /* all IRQ no FIQ */ | 188 | /* all IRQ no FIQ */ |
141 | __raw_writel(0, avic_base + AVIC_INTTYPEH); | 189 | __raw_writel(0, avic_base + AVIC_INTTYPEH); |
142 | __raw_writel(0, avic_base + AVIC_INTTYPEL); | 190 | __raw_writel(0, avic_base + AVIC_INTTYPEL); |
143 | for (i = 0; i < AVIC_NUM_IRQS; i++) { | 191 | |
144 | irq_set_chip_and_handler(i, &mxc_avic_chip.base, | 192 | for (i = 0; i < AVIC_NUM_IRQS; i += 32) |
145 | handle_level_irq); | 193 | avic_init_gc(i); |
146 | set_irq_flags(i, IRQF_VALID); | ||
147 | } | ||
148 | 194 | ||
149 | /* Set default priority value (0) for all IRQ's */ | 195 | /* Set default priority value (0) for all IRQ's */ |
150 | for (i = 0; i < 8; i++) | 196 | for (i = 0; i < 8; i++) |
@@ -157,4 +203,3 @@ void __init mxc_init_irq(void __iomem *irqbase) | |||
157 | 203 | ||
158 | printk(KERN_INFO "MXC IRQ initialized\n"); | 204 | printk(KERN_INFO "MXC IRQ initialized\n"); |
159 | } | 205 | } |
160 | |||
diff --git a/arch/arm/plat-mxc/devices/platform-pata_imx.c b/arch/arm/plat-mxc/devices/platform-pata_imx.c index de33048aad6a..70e2f2a44714 100644 --- a/arch/arm/plat-mxc/devices/platform-pata_imx.c +++ b/arch/arm/plat-mxc/devices/platform-pata_imx.c | |||
@@ -44,7 +44,7 @@ struct platform_device *__init imx_add_pata_imx( | |||
44 | struct resource res[] = { | 44 | struct resource res[] = { |
45 | { | 45 | { |
46 | .start = data->iobase, | 46 | .start = data->iobase, |
47 | .end = data->iobase + data->iobase - 1, | 47 | .end = data->iobase + data->iosize - 1, |
48 | .flags = IORESOURCE_MEM, | 48 | .flags = IORESOURCE_MEM, |
49 | }, | 49 | }, |
50 | { | 50 | { |
diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h index 318e0da13a79..5bee446db51f 100644 --- a/arch/arm/plat-mxc/include/mach/common.h +++ b/arch/arm/plat-mxc/include/mach/common.h | |||
@@ -73,4 +73,18 @@ extern void mx51_efikamx_reset(void); | |||
73 | extern int mx53_revision(void); | 73 | extern int mx53_revision(void); |
74 | extern int mx53_display_revision(void); | 74 | extern int mx53_display_revision(void); |
75 | extern void imx_print_silicon_rev(const char *cpu, int srev); | 75 | extern void imx_print_silicon_rev(const char *cpu, int srev); |
76 | |||
77 | void avic_handle_irq(struct pt_regs *); | ||
78 | void tzic_handle_irq(struct pt_regs *); | ||
79 | |||
80 | #define imx1_handle_irq avic_handle_irq | ||
81 | #define imx21_handle_irq avic_handle_irq | ||
82 | #define imx25_handle_irq avic_handle_irq | ||
83 | #define imx27_handle_irq avic_handle_irq | ||
84 | #define imx31_handle_irq avic_handle_irq | ||
85 | #define imx35_handle_irq avic_handle_irq | ||
86 | #define imx50_handle_irq tzic_handle_irq | ||
87 | #define imx51_handle_irq tzic_handle_irq | ||
88 | #define imx53_handle_irq tzic_handle_irq | ||
89 | |||
76 | #endif | 90 | #endif |
diff --git a/arch/arm/plat-mxc/include/mach/entry-macro.S b/arch/arm/plat-mxc/include/mach/entry-macro.S index 066d464d322d..842fbcb0d6cc 100644 --- a/arch/arm/plat-mxc/include/mach/entry-macro.S +++ b/arch/arm/plat-mxc/include/mach/entry-macro.S | |||
@@ -9,72 +9,16 @@ | |||
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <mach/hardware.h> | 12 | /* Unused, we use CONFIG_MULTI_IRQ_HANDLER */ |
13 | 13 | ||
14 | #define AVIC_NIMASK 0x04 | ||
15 | |||
16 | @ this macro disables fast irq (not implemented) | ||
17 | .macro disable_fiq | 14 | .macro disable_fiq |
18 | .endm | 15 | .endm |
19 | 16 | ||
20 | .macro get_irqnr_preamble, base, tmp | 17 | .macro get_irqnr_preamble, base, tmp |
21 | #ifndef CONFIG_MXC_TZIC | ||
22 | ldr \base, =avic_base | ||
23 | ldr \base, [\base] | ||
24 | #ifdef CONFIG_MXC_IRQ_PRIOR | ||
25 | ldr r4, [\base, #AVIC_NIMASK] | ||
26 | #endif | ||
27 | #elif defined CONFIG_MXC_TZIC | ||
28 | ldr \base, =tzic_base | ||
29 | ldr \base, [\base] | ||
30 | #endif /* CONFIG_MXC_TZIC */ | ||
31 | .endm | 18 | .endm |
32 | 19 | ||
33 | .macro arch_ret_to_user, tmp1, tmp2 | 20 | .macro arch_ret_to_user, tmp1, tmp2 |
34 | .endm | 21 | .endm |
35 | 22 | ||
36 | @ this macro checks which interrupt occurred | ||
37 | @ and returns its number in irqnr | ||
38 | @ and returns if an interrupt occurred in irqstat | ||
39 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 23 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
40 | #ifndef CONFIG_MXC_TZIC | ||
41 | @ Load offset & priority of the highest priority | ||
42 | @ interrupt pending from AVIC_NIVECSR | ||
43 | ldr \irqstat, [\base, #0x40] | ||
44 | @ Shift to get the decoded IRQ number, using ASR so | ||
45 | @ 'no interrupt pending' becomes 0xffffffff | ||
46 | mov \irqnr, \irqstat, asr #16 | ||
47 | @ set zero flag if IRQ + 1 == 0 | ||
48 | adds \tmp, \irqnr, #1 | ||
49 | #ifdef CONFIG_MXC_IRQ_PRIOR | ||
50 | bicne \tmp, \irqstat, #0xFFFFFFE0 | ||
51 | strne \tmp, [\base, #AVIC_NIMASK] | ||
52 | streq r4, [\base, #AVIC_NIMASK] | ||
53 | #endif | ||
54 | #elif defined CONFIG_MXC_TZIC | ||
55 | @ Load offset & priority of the highest priority | ||
56 | @ interrupt pending. | ||
57 | @ 0x080 is INTSEC0 register | ||
58 | @ 0xD80 is HIPND0 register | ||
59 | mov \irqnr, #0 | ||
60 | 1000: add \irqstat, \base, \irqnr, lsr #3 | ||
61 | ldr \tmp, [\irqstat, #0xd80] | ||
62 | ldr \irqstat, [\irqstat, #0x080] | ||
63 | ands \tmp, \tmp, \irqstat | ||
64 | bne 1001f | ||
65 | add \irqnr, \irqnr, #32 | ||
66 | cmp \irqnr, #128 | ||
67 | blo 1000b | ||
68 | b 2001f | ||
69 | 1001: mov \irqstat, #1 | ||
70 | 1002: tst \tmp, \irqstat | ||
71 | bne 2002f | ||
72 | movs \tmp, \tmp, lsr #1 | ||
73 | addne \irqnr, \irqnr, #1 | ||
74 | bne 1002b | ||
75 | 2001: | ||
76 | mov \irqnr, #0 | ||
77 | 2002: | ||
78 | movs \irqnr, \irqnr | ||
79 | #endif | ||
80 | .endm | 24 | .endm |
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx3.h b/arch/arm/plat-mxc/include/mach/iomux-mx3.h index c92f0b1f216f..63f22a009a65 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-mx3.h +++ b/arch/arm/plat-mxc/include/mach/iomux-mx3.h | |||
@@ -735,6 +735,7 @@ enum iomux_pins { | |||
735 | #define MX31_PIN_KEY_COL5_KEY_COL5 IOMUX_MODE(MX31_PIN_KEY_COL5, IOMUX_CONFIG_FUNC) | 735 | #define MX31_PIN_KEY_COL5_KEY_COL5 IOMUX_MODE(MX31_PIN_KEY_COL5, IOMUX_CONFIG_FUNC) |
736 | #define MX31_PIN_KEY_COL6_KEY_COL6 IOMUX_MODE(MX31_PIN_KEY_COL6, IOMUX_CONFIG_FUNC) | 736 | #define MX31_PIN_KEY_COL6_KEY_COL6 IOMUX_MODE(MX31_PIN_KEY_COL6, IOMUX_CONFIG_FUNC) |
737 | #define MX31_PIN_KEY_COL7_KEY_COL7 IOMUX_MODE(MX31_PIN_KEY_COL7, IOMUX_CONFIG_FUNC) | 737 | #define MX31_PIN_KEY_COL7_KEY_COL7 IOMUX_MODE(MX31_PIN_KEY_COL7, IOMUX_CONFIG_FUNC) |
738 | #define MX31_PIN_WATCHDOG_RST__WATCHDOG_RST IOMUX_MODE(MX31_PIN_WATCHDOG_RST, IOMUX_CONFIG_FUNC) | ||
738 | 739 | ||
739 | 740 | ||
740 | /* | 741 | /* |
diff --git a/arch/arm/plat-mxc/include/mach/mx25.h b/arch/arm/plat-mxc/include/mach/mx25.h index 8dcab80acff3..ccebf5ba12f0 100644 --- a/arch/arm/plat-mxc/include/mach/mx25.h +++ b/arch/arm/plat-mxc/include/mach/mx25.h | |||
@@ -41,6 +41,7 @@ | |||
41 | #define MX25_SSI2_BASE_ADDR 0x50014000 | 41 | #define MX25_SSI2_BASE_ADDR 0x50014000 |
42 | #define MX25_SSI1_BASE_ADDR 0x50034000 | 42 | #define MX25_SSI1_BASE_ADDR 0x50034000 |
43 | #define MX25_NFC_BASE_ADDR 0xbb000000 | 43 | #define MX25_NFC_BASE_ADDR 0xbb000000 |
44 | #define MX25_IIM_BASE_ADDR 0x53ff0000 | ||
44 | #define MX25_DRYICE_BASE_ADDR 0x53ffc000 | 45 | #define MX25_DRYICE_BASE_ADDR 0x53ffc000 |
45 | #define MX25_ESDHC1_BASE_ADDR 0x53fb4000 | 46 | #define MX25_ESDHC1_BASE_ADDR 0x53fb4000 |
46 | #define MX25_ESDHC2_BASE_ADDR 0x53fb8000 | 47 | #define MX25_ESDHC2_BASE_ADDR 0x53fb8000 |
diff --git a/arch/arm/plat-mxc/irq-common.c b/arch/arm/plat-mxc/irq-common.c index 96953e2e4f11..b6e11458e5ae 100644 --- a/arch/arm/plat-mxc/irq-common.c +++ b/arch/arm/plat-mxc/irq-common.c | |||
@@ -23,17 +23,17 @@ | |||
23 | 23 | ||
24 | int imx_irq_set_priority(unsigned char irq, unsigned char prio) | 24 | int imx_irq_set_priority(unsigned char irq, unsigned char prio) |
25 | { | 25 | { |
26 | struct mxc_irq_chip *chip; | 26 | struct irq_chip_generic *gc; |
27 | struct irq_chip *base; | 27 | struct mxc_extra_irq *exirq; |
28 | int ret; | 28 | int ret; |
29 | 29 | ||
30 | ret = -ENOSYS; | 30 | ret = -ENOSYS; |
31 | 31 | ||
32 | base = irq_get_chip(irq); | 32 | gc = irq_get_chip_data(irq); |
33 | if (base) { | 33 | if (gc && gc->private) { |
34 | chip = container_of(base, struct mxc_irq_chip, base); | 34 | exirq = gc->private; |
35 | if (chip->set_priority) | 35 | if (exirq->set_priority) |
36 | ret = chip->set_priority(irq, prio); | 36 | ret = exirq->set_priority(irq, prio); |
37 | } | 37 | } |
38 | 38 | ||
39 | return ret; | 39 | return ret; |
@@ -43,15 +43,16 @@ EXPORT_SYMBOL(imx_irq_set_priority); | |||
43 | int mxc_set_irq_fiq(unsigned int irq, unsigned int type) | 43 | int mxc_set_irq_fiq(unsigned int irq, unsigned int type) |
44 | { | 44 | { |
45 | struct irq_chip_generic *gc; | 45 | struct irq_chip_generic *gc; |
46 | int (*set_irq_fiq)(unsigned int, unsigned int); | 46 | struct mxc_extra_irq *exirq; |
47 | int ret; | 47 | int ret; |
48 | 48 | ||
49 | ret = -ENOSYS; | 49 | ret = -ENOSYS; |
50 | 50 | ||
51 | gc = irq_get_chip_data(irq); | 51 | gc = irq_get_chip_data(irq); |
52 | if (gc && gc->private) { | 52 | if (gc && gc->private) { |
53 | set_irq_fiq = gc->private; | 53 | exirq = gc->private; |
54 | ret = set_irq_fiq(irq, type); | 54 | if (exirq->set_irq_fiq) |
55 | ret = exirq->set_irq_fiq(irq, type); | ||
55 | } | 56 | } |
56 | 57 | ||
57 | return ret; | 58 | return ret; |
diff --git a/arch/arm/plat-mxc/irq-common.h b/arch/arm/plat-mxc/irq-common.h index 7203543fb1b3..6ccb3a14c693 100644 --- a/arch/arm/plat-mxc/irq-common.h +++ b/arch/arm/plat-mxc/irq-common.h | |||
@@ -19,9 +19,8 @@ | |||
19 | #ifndef __PLAT_MXC_IRQ_COMMON_H__ | 19 | #ifndef __PLAT_MXC_IRQ_COMMON_H__ |
20 | #define __PLAT_MXC_IRQ_COMMON_H__ | 20 | #define __PLAT_MXC_IRQ_COMMON_H__ |
21 | 21 | ||
22 | struct mxc_irq_chip | 22 | struct mxc_extra_irq |
23 | { | 23 | { |
24 | struct irq_chip base; | ||
25 | int (*set_priority)(unsigned char irq, unsigned char prio); | 24 | int (*set_priority)(unsigned char irq, unsigned char prio); |
26 | int (*set_irq_fiq)(unsigned int irq, unsigned int type); | 25 | int (*set_irq_fiq)(unsigned int irq, unsigned int type); |
27 | }; | 26 | }; |
diff --git a/arch/arm/plat-mxc/tzic.c b/arch/arm/plat-mxc/tzic.c index f257fccdc394..e993a184189a 100644 --- a/arch/arm/plat-mxc/tzic.c +++ b/arch/arm/plat-mxc/tzic.c | |||
@@ -42,7 +42,7 @@ | |||
42 | #define TZIC_SRCCLAR0 0x0280 /* Source Clear Register 0 */ | 42 | #define TZIC_SRCCLAR0 0x0280 /* Source Clear Register 0 */ |
43 | #define TZIC_PRIORITY0 0x0400 /* Priority Register 0 */ | 43 | #define TZIC_PRIORITY0 0x0400 /* Priority Register 0 */ |
44 | #define TZIC_PND0 0x0D00 /* Pending Register 0 */ | 44 | #define TZIC_PND0 0x0D00 /* Pending Register 0 */ |
45 | #define TZIC_HIPND0 0x0D80 /* High Priority Pending Register */ | 45 | #define TZIC_HIPND(i) (0x0D80+ ((i) << 2)) /* High Priority Pending Register */ |
46 | #define TZIC_WAKEUP0(i) (0x0E00 + ((i) << 2)) /* Wakeup Config Register */ | 46 | #define TZIC_WAKEUP0(i) (0x0E00 + ((i) << 2)) /* Wakeup Config Register */ |
47 | #define TZIC_SWINT 0x0F00 /* Software Interrupt Rigger Register */ | 47 | #define TZIC_SWINT 0x0F00 /* Software Interrupt Rigger Register */ |
48 | #define TZIC_ID0 0x0FD0 /* Indentification Register 0 */ | 48 | #define TZIC_ID0 0x0FD0 /* Indentification Register 0 */ |
@@ -74,6 +74,12 @@ static int tzic_set_irq_fiq(unsigned int irq, unsigned int type) | |||
74 | 74 | ||
75 | static unsigned int *wakeup_intr[4]; | 75 | static unsigned int *wakeup_intr[4]; |
76 | 76 | ||
77 | static struct mxc_extra_irq tzic_extra_irq = { | ||
78 | #ifdef CONFIG_FIQ | ||
79 | .set_irq_fiq = tzic_set_irq_fiq, | ||
80 | #endif | ||
81 | }; | ||
82 | |||
77 | static __init void tzic_init_gc(unsigned int irq_start) | 83 | static __init void tzic_init_gc(unsigned int irq_start) |
78 | { | 84 | { |
79 | struct irq_chip_generic *gc; | 85 | struct irq_chip_generic *gc; |
@@ -82,7 +88,7 @@ static __init void tzic_init_gc(unsigned int irq_start) | |||
82 | 88 | ||
83 | gc = irq_alloc_generic_chip("tzic", 1, irq_start, tzic_base, | 89 | gc = irq_alloc_generic_chip("tzic", 1, irq_start, tzic_base, |
84 | handle_level_irq); | 90 | handle_level_irq); |
85 | gc->private = tzic_set_irq_fiq; | 91 | gc->private = &tzic_extra_irq; |
86 | gc->wake_enabled = IRQ_MSK(32); | 92 | gc->wake_enabled = IRQ_MSK(32); |
87 | wakeup_intr[idx] = &gc->wake_active; | 93 | wakeup_intr[idx] = &gc->wake_active; |
88 | 94 | ||
@@ -96,6 +102,28 @@ static __init void tzic_init_gc(unsigned int irq_start) | |||
96 | irq_setup_generic_chip(gc, IRQ_MSK(32), 0, IRQ_NOREQUEST, 0); | 102 | irq_setup_generic_chip(gc, IRQ_MSK(32), 0, IRQ_NOREQUEST, 0); |
97 | } | 103 | } |
98 | 104 | ||
105 | asmlinkage void __exception_irq_entry tzic_handle_irq(struct pt_regs *regs) | ||
106 | { | ||
107 | u32 stat; | ||
108 | int i, irqofs, handled; | ||
109 | |||
110 | do { | ||
111 | handled = 0; | ||
112 | |||
113 | for (i = 0; i < 4; i++) { | ||
114 | stat = __raw_readl(tzic_base + TZIC_HIPND(i)) & | ||
115 | __raw_readl(tzic_base + TZIC_INTSEC0(i)); | ||
116 | |||
117 | while (stat) { | ||
118 | handled = 1; | ||
119 | irqofs = fls(stat) - 1; | ||
120 | handle_IRQ(irqofs + i * 32, regs); | ||
121 | stat &= ~(1 << irqofs); | ||
122 | } | ||
123 | } | ||
124 | } while (handled); | ||
125 | } | ||
126 | |||
99 | /* | 127 | /* |
100 | * This function initializes the TZIC hardware and disables all the | 128 | * This function initializes the TZIC hardware and disables all the |
101 | * interrupts. It registers the interrupt enable and disable functions | 129 | * interrupts. It registers the interrupt enable and disable functions |