aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2012-05-18 02:34:49 -0400
committerPaul Mundt <lethal@linux-sh.org>2012-05-18 02:34:49 -0400
commitb894701e7c472dbc6267bdde68bd6d35266b8dfc (patch)
treeaae61d26286a21992c3af648028a52aa6724f5fc /arch/sh
parenta7734e51077e3eb3943887d15bb5c49063738263 (diff)
sh: mach-se evt2irq migration.
Migrate Solution Engine boards to evt2irq backed hwirq lookups. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/boards/mach-se/7722/setup.c3
-rw-r--r--arch/sh/boards/mach-se/7724/setup.c31
-rw-r--r--arch/sh/include/mach-se/mach/se.h19
-rw-r--r--arch/sh/include/mach-se/mach/se7343.h9
-rw-r--r--arch/sh/include/mach-se/mach/se7721.h6
-rw-r--r--arch/sh/include/mach-se/mach/se7722.h9
-rw-r--r--arch/sh/include/mach-se/mach/se7724.h7
-rw-r--r--arch/sh/include/mach-se/mach/se7751.h3
-rw-r--r--arch/sh/include/mach-se/mach/se7780.h7
9 files changed, 52 insertions, 42 deletions
diff --git a/arch/sh/boards/mach-se/7722/setup.c b/arch/sh/boards/mach-se/7722/setup.c
index e1963fecd761..8f7f0550cfde 100644
--- a/arch/sh/boards/mach-se/7722/setup.c
+++ b/arch/sh/boards/mach-se/7722/setup.c
@@ -16,6 +16,7 @@
16#include <linux/input.h> 16#include <linux/input.h>
17#include <linux/input/sh_keysc.h> 17#include <linux/input/sh_keysc.h>
18#include <linux/smc91x.h> 18#include <linux/smc91x.h>
19#include <linux/sh_intc.h>
19#include <mach-se/mach/se7722.h> 20#include <mach-se/mach/se7722.h>
20#include <mach-se/mach/mrshpc.h> 21#include <mach-se/mach/mrshpc.h>
21#include <asm/machvec.h> 22#include <asm/machvec.h>
@@ -114,7 +115,7 @@ static struct resource sh_keysc_resources[] = {
114 .flags = IORESOURCE_MEM, 115 .flags = IORESOURCE_MEM,
115 }, 116 },
116 [1] = { 117 [1] = {
117 .start = 79, 118 .start = evt2irq(0xbe0),
118 .flags = IORESOURCE_IRQ, 119 .flags = IORESOURCE_IRQ,
119 }, 120 },
120}; 121};
diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c
index c540b16547c3..479cdf876fda 100644
--- a/arch/sh/boards/mach-se/7724/setup.c
+++ b/arch/sh/boards/mach-se/7724/setup.c
@@ -24,6 +24,7 @@
24#include <linux/input/sh_keysc.h> 24#include <linux/input/sh_keysc.h>
25#include <linux/usb/r8a66597.h> 25#include <linux/usb/r8a66597.h>
26#include <linux/sh_eth.h> 26#include <linux/sh_eth.h>
27#include <linux/sh_intc.h>
27#include <linux/videodev2.h> 28#include <linux/videodev2.h>
28#include <video/sh_mobile_lcdc.h> 29#include <video/sh_mobile_lcdc.h>
29#include <media/sh_mobile_ceu.h> 30#include <media/sh_mobile_ceu.h>
@@ -197,7 +198,7 @@ static struct resource lcdc_resources[] = {
197 .flags = IORESOURCE_MEM, 198 .flags = IORESOURCE_MEM,
198 }, 199 },
199 [1] = { 200 [1] = {
200 .start = 106, 201 .start = evt2irq(0xf40),
201 .flags = IORESOURCE_IRQ, 202 .flags = IORESOURCE_IRQ,
202 }, 203 },
203}; 204};
@@ -224,7 +225,7 @@ static struct resource ceu0_resources[] = {
224 .flags = IORESOURCE_MEM, 225 .flags = IORESOURCE_MEM,
225 }, 226 },
226 [1] = { 227 [1] = {
227 .start = 52, 228 .start = evt2irq(0x880),
228 .flags = IORESOURCE_IRQ, 229 .flags = IORESOURCE_IRQ,
229 }, 230 },
230 [2] = { 231 [2] = {
@@ -255,7 +256,7 @@ static struct resource ceu1_resources[] = {
255 .flags = IORESOURCE_MEM, 256 .flags = IORESOURCE_MEM,
256 }, 257 },
257 [1] = { 258 [1] = {
258 .start = 63, 259 .start = evt2irq(0x9e0),
259 .flags = IORESOURCE_IRQ, 260 .flags = IORESOURCE_IRQ,
260 }, 261 },
261 [2] = { 262 [2] = {
@@ -289,7 +290,7 @@ static struct resource fsi_resources[] = {
289 .flags = IORESOURCE_MEM, 290 .flags = IORESOURCE_MEM,
290 }, 291 },
291 [1] = { 292 [1] = {
292 .start = 108, 293 .start = evt2irq(0xf80),
293 .flags = IORESOURCE_IRQ, 294 .flags = IORESOURCE_IRQ,
294 }, 295 },
295}; 296};
@@ -343,7 +344,7 @@ static struct resource keysc_resources[] = {
343 .flags = IORESOURCE_MEM, 344 .flags = IORESOURCE_MEM,
344 }, 345 },
345 [1] = { 346 [1] = {
346 .start = 79, 347 .start = evt2irq(0xbe0),
347 .flags = IORESOURCE_IRQ, 348 .flags = IORESOURCE_IRQ,
348 }, 349 },
349}; 350};
@@ -366,7 +367,7 @@ static struct resource sh_eth_resources[] = {
366 .flags = IORESOURCE_MEM, 367 .flags = IORESOURCE_MEM,
367 }, 368 },
368 [1] = { 369 [1] = {
369 .start = 91, 370 .start = evt2irq(0xd60),
370 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 371 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
371 }, 372 },
372}; 373};
@@ -397,8 +398,8 @@ static struct resource sh7724_usb0_host_resources[] = {
397 .flags = IORESOURCE_MEM, 398 .flags = IORESOURCE_MEM,
398 }, 399 },
399 [1] = { 400 [1] = {
400 .start = 65, 401 .start = evt2irq(0xa20),
401 .end = 65, 402 .end = evt2irq(0xa20),
402 .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW, 403 .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW,
403 }, 404 },
404}; 405};
@@ -426,8 +427,8 @@ static struct resource sh7724_usb1_gadget_resources[] = {
426 .flags = IORESOURCE_MEM, 427 .flags = IORESOURCE_MEM,
427 }, 428 },
428 [1] = { 429 [1] = {
429 .start = 66, 430 .start = evt2irq(0xa40),
430 .end = 66, 431 .end = evt2irq(0xa40),
431 .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW, 432 .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW,
432 }, 433 },
433}; 434};
@@ -452,7 +453,7 @@ static struct resource sdhi0_cn7_resources[] = {
452 .flags = IORESOURCE_MEM, 453 .flags = IORESOURCE_MEM,
453 }, 454 },
454 [1] = { 455 [1] = {
455 .start = 100, 456 .start = evt2irq(0xe80),
456 .flags = IORESOURCE_IRQ, 457 .flags = IORESOURCE_IRQ,
457 }, 458 },
458}; 459};
@@ -481,7 +482,7 @@ static struct resource sdhi1_cn8_resources[] = {
481 .flags = IORESOURCE_MEM, 482 .flags = IORESOURCE_MEM,
482 }, 483 },
483 [1] = { 484 [1] = {
484 .start = 23, 485 .start = evt2irq(0x4e0),
485 .flags = IORESOURCE_IRQ, 486 .flags = IORESOURCE_IRQ,
486 }, 487 },
487}; 488};
@@ -511,7 +512,7 @@ static struct resource irda_resources[] = {
511 .flags = IORESOURCE_MEM, 512 .flags = IORESOURCE_MEM,
512 }, 513 },
513 [1] = { 514 [1] = {
514 .start = 20, 515 .start = evt2irq(0x480),
515 .flags = IORESOURCE_IRQ, 516 .flags = IORESOURCE_IRQ,
516 }, 517 },
517}; 518};
@@ -549,7 +550,7 @@ static struct resource sh_vou_resources[] = {
549 .flags = IORESOURCE_MEM, 550 .flags = IORESOURCE_MEM,
550 }, 551 },
551 [1] = { 552 [1] = {
552 .start = 55, 553 .start = evt2irq(0x8e0),
553 .flags = IORESOURCE_IRQ, 554 .flags = IORESOURCE_IRQ,
554 }, 555 },
555}; 556};
@@ -595,6 +596,7 @@ static struct i2c_board_info i2c0_devices[] = {
595#define EEPROM_DATA 0xBA20600C 596#define EEPROM_DATA 0xBA20600C
596#define EEPROM_STAT 0xBA206010 597#define EEPROM_STAT 0xBA206010
597#define EEPROM_STRT 0xBA206014 598#define EEPROM_STRT 0xBA206014
599
598static int __init sh_eth_is_eeprom_ready(void) 600static int __init sh_eth_is_eeprom_ready(void)
599{ 601{
600 int t = 10000; 602 int t = 10000;
@@ -651,7 +653,6 @@ extern char ms7724se_sdram_enter_end;
651extern char ms7724se_sdram_leave_start; 653extern char ms7724se_sdram_leave_start;
652extern char ms7724se_sdram_leave_end; 654extern char ms7724se_sdram_leave_end;
653 655
654
655static int __init arch_setup(void) 656static int __init arch_setup(void)
656{ 657{
657 /* enable I2C device */ 658 /* enable I2C device */
diff --git a/arch/sh/include/mach-se/mach/se.h b/arch/sh/include/mach-se/mach/se.h
index 14be91c5a2f0..8a6d44b4987b 100644
--- a/arch/sh/include/mach-se/mach/se.h
+++ b/arch/sh/include/mach-se/mach/se.h
@@ -8,6 +8,7 @@
8 * 8 *
9 * Hitachi SolutionEngine support 9 * Hitachi SolutionEngine support
10 */ 10 */
11#include <linux/sh_intc.h>
11 12
12/* Box specific addresses. */ 13/* Box specific addresses. */
13 14
@@ -82,16 +83,16 @@
82#define INTC_IPRD 0xa4000018UL 83#define INTC_IPRD 0xa4000018UL
83#define INTC_IPRE 0xa400001aUL 84#define INTC_IPRE 0xa400001aUL
84 85
85#define IRQ0_IRQ 32 86#define IRQ0_IRQ evt2irq(0x600)
86#define IRQ1_IRQ 33 87#define IRQ1_IRQ evt2irq(0x620)
87#endif 88#endif
88 89
89#if defined(CONFIG_CPU_SUBTYPE_SH7705) 90#if defined(CONFIG_CPU_SUBTYPE_SH7705)
90#define IRQ_STNIC 12 91#define IRQ_STNIC evt2irq(0x380)
91#define IRQ_CFCARD 14 92#define IRQ_CFCARD evt2irq(0x3c0)
92#else 93#else
93#define IRQ_STNIC 10 94#define IRQ_STNIC evt2irq(0x340)
94#define IRQ_CFCARD 7 95#define IRQ_CFCARD evt2irq(0x2e0)
95#endif 96#endif
96 97
97/* SH Ether support (SH7710/SH7712) */ 98/* SH Ether support (SH7710/SH7712) */
@@ -105,9 +106,9 @@
105# define PHY_ID 0x01 106# define PHY_ID 0x01
106#endif 107#endif
107/* Ether IRQ */ 108/* Ether IRQ */
108#define SH_ETH0_IRQ 80 109#define SH_ETH0_IRQ evt2irq(0xc00)
109#define SH_ETH1_IRQ 81 110#define SH_ETH1_IRQ evt2irq(0xc20)
110#define SH_TSU_IRQ 82 111#define SH_TSU_IRQ evt2irq(0xc40)
111 112
112void init_se_IRQ(void); 113void init_se_IRQ(void);
113 114
diff --git a/arch/sh/include/mach-se/mach/se7343.h b/arch/sh/include/mach-se/mach/se7343.h
index 8d8170d6cc43..50b5d575dff0 100644
--- a/arch/sh/include/mach-se/mach/se7343.h
+++ b/arch/sh/include/mach-se/mach/se7343.h
@@ -8,6 +8,7 @@
8 * 8 *
9 * SH-Mobile SolutionEngine 7343 support 9 * SH-Mobile SolutionEngine 7343 support
10 */ 10 */
11#include <linux/sh_intc.h>
11 12
12/* Box specific addresses. */ 13/* Box specific addresses. */
13 14
@@ -118,10 +119,10 @@
118#define FPGA_IN 0xb1400000 119#define FPGA_IN 0xb1400000
119#define FPGA_OUT 0xb1400002 120#define FPGA_OUT 0xb1400002
120 121
121#define IRQ0_IRQ 32 122#define IRQ0_IRQ evt2irq(0x600)
122#define IRQ1_IRQ 33 123#define IRQ1_IRQ evt2irq(0x620)
123#define IRQ4_IRQ 36 124#define IRQ4_IRQ evt2irq(0x680)
124#define IRQ5_IRQ 37 125#define IRQ5_IRQ evt2irq(0x6a0)
125 126
126#define SE7343_FPGA_IRQ_MRSHPC0 0 127#define SE7343_FPGA_IRQ_MRSHPC0 0
127#define SE7343_FPGA_IRQ_MRSHPC1 1 128#define SE7343_FPGA_IRQ_MRSHPC1 1
diff --git a/arch/sh/include/mach-se/mach/se7721.h b/arch/sh/include/mach-se/mach/se7721.h
index b957f6041193..eabd0538de44 100644
--- a/arch/sh/include/mach-se/mach/se7721.h
+++ b/arch/sh/include/mach-se/mach/se7721.h
@@ -11,6 +11,8 @@
11 11
12#ifndef __ASM_SH_SE7721_H 12#ifndef __ASM_SH_SE7721_H
13#define __ASM_SH_SE7721_H 13#define __ASM_SH_SE7721_H
14
15#include <linux/sh_intc.h>
14#include <asm/addrspace.h> 16#include <asm/addrspace.h>
15 17
16/* Box specific addresses. */ 18/* Box specific addresses. */
@@ -49,9 +51,9 @@
49#define MRSHPC_PCIC_INFO (PA_MRSHPC + 30) 51#define MRSHPC_PCIC_INFO (PA_MRSHPC + 30)
50 52
51#define PA_LED 0xB6800000 /* 8bit LED */ 53#define PA_LED 0xB6800000 /* 8bit LED */
52#define PA_FPGA 0xB7000000 /* FPGA base address */ 54#define PA_FPGA 0xB7000000 /* FPGA base address */
53 55
54#define MRSHPC_IRQ0 10 56#define MRSHPC_IRQ0 evt2irq(0x340)
55 57
56#define FPGA_ILSR1 (PA_FPGA + 0x02) 58#define FPGA_ILSR1 (PA_FPGA + 0x02)
57#define FPGA_ILSR2 (PA_FPGA + 0x03) 59#define FPGA_ILSR2 (PA_FPGA + 0x03)
diff --git a/arch/sh/include/mach-se/mach/se7722.h b/arch/sh/include/mach-se/mach/se7722.h
index 16505bfb8a9e..201081ebdbce 100644
--- a/arch/sh/include/mach-se/mach/se7722.h
+++ b/arch/sh/include/mach-se/mach/se7722.h
@@ -13,6 +13,7 @@
13 * for more details. 13 * for more details.
14 * 14 *
15 */ 15 */
16#include <linux/sh_intc.h>
16#include <asm/addrspace.h> 17#include <asm/addrspace.h>
17 18
18/* Box specific addresses. */ 19/* Box specific addresses. */
@@ -31,7 +32,7 @@
31 32
32#define PA_PERIPHERAL 0xB0000000 33#define PA_PERIPHERAL 0xB0000000
33 34
34#define PA_PCIC PA_PERIPHERAL /* MR-SHPC-01 PCMCIA */ 35#define PA_PCIC PA_PERIPHERAL /* MR-SHPC-01 PCMCIA */
35#define PA_MRSHPC (PA_PERIPHERAL + 0x003fffe0) /* MR-SHPC-01 PCMCIA controller */ 36#define PA_MRSHPC (PA_PERIPHERAL + 0x003fffe0) /* MR-SHPC-01 PCMCIA controller */
36#define PA_MRSHPC_MW1 (PA_PERIPHERAL + 0x00400000) /* MR-SHPC-01 memory window base */ 37#define PA_MRSHPC_MW1 (PA_PERIPHERAL + 0x00400000) /* MR-SHPC-01 memory window base */
37#define PA_MRSHPC_MW2 (PA_PERIPHERAL + 0x00500000) /* MR-SHPC-01 attribute window base */ 38#define PA_MRSHPC_MW2 (PA_PERIPHERAL + 0x00500000) /* MR-SHPC-01 attribute window base */
@@ -51,7 +52,7 @@
51#define MRSHPC_PCIC_INFO (PA_MRSHPC + 30) 52#define MRSHPC_PCIC_INFO (PA_MRSHPC + 30)
52 53
53#define PA_LED (PA_PERIPHERAL + 0x00800000) /* 8bit LED */ 54#define PA_LED (PA_PERIPHERAL + 0x00800000) /* 8bit LED */
54#define PA_FPGA (PA_PERIPHERAL + 0x01800000) /* FPGA base address */ 55#define PA_FPGA (PA_PERIPHERAL + 0x01800000) /* FPGA base address */
55 56
56#define PA_LAN (PA_AREA6_IO + 0) /* SMC LAN91C111 */ 57#define PA_LAN (PA_AREA6_IO + 0) /* SMC LAN91C111 */
57/* GPIO */ 58/* GPIO */
@@ -77,8 +78,8 @@
77#define PORT_HIZCRC 0xA405015CUL 78#define PORT_HIZCRC 0xA405015CUL
78 79
79/* IRQ */ 80/* IRQ */
80#define IRQ0_IRQ 32 81#define IRQ0_IRQ evt2irq(0x600)
81#define IRQ1_IRQ 33 82#define IRQ1_IRQ evt2irq(0x620)
82 83
83#define IRQ01_MODE 0xb1800000 84#define IRQ01_MODE 0xb1800000
84#define IRQ01_STS 0xb1800004 85#define IRQ01_STS 0xb1800004
diff --git a/arch/sh/include/mach-se/mach/se7724.h b/arch/sh/include/mach-se/mach/se7724.h
index 29514a39d0f5..be842dd1ca02 100644
--- a/arch/sh/include/mach-se/mach/se7724.h
+++ b/arch/sh/include/mach-se/mach/se7724.h
@@ -18,6 +18,7 @@
18 * for more details. 18 * for more details.
19 * 19 *
20 */ 20 */
21#include <linux/sh_intc.h>
21#include <asm/addrspace.h> 22#include <asm/addrspace.h>
22 23
23/* SH Eth */ 24/* SH Eth */
@@ -35,9 +36,9 @@
35#define IRQ2_MR (0xba200028) 36#define IRQ2_MR (0xba200028)
36 37
37/* IRQ */ 38/* IRQ */
38#define IRQ0_IRQ 32 39#define IRQ0_IRQ evt2irq(0x600)
39#define IRQ1_IRQ 33 40#define IRQ1_IRQ evt2irq(0x620)
40#define IRQ2_IRQ 34 41#define IRQ2_IRQ evt2irq(0x640)
41 42
42/* Bits in IRQ012 registers */ 43/* Bits in IRQ012 registers */
43#define SE7724_FPGA_IRQ_BASE 220 44#define SE7724_FPGA_IRQ_BASE 220
diff --git a/arch/sh/include/mach-se/mach/se7751.h b/arch/sh/include/mach-se/mach/se7751.h
index b36792ac5d66..271871793d59 100644
--- a/arch/sh/include/mach-se/mach/se7751.h
+++ b/arch/sh/include/mach-se/mach/se7751.h
@@ -11,6 +11,7 @@
11 * Modified for 7751 Solution Engine by 11 * Modified for 7751 Solution Engine by
12 * Ian da Silva and Jeremy Siegel, 2001. 12 * Ian da Silva and Jeremy Siegel, 2001.
13 */ 13 */
14#include <linux/sh_intc.h>
14 15
15/* Box specific addresses. */ 16/* Box specific addresses. */
16 17
@@ -63,7 +64,7 @@
63#define BCR_ILCRF (PA_BCR + 10) 64#define BCR_ILCRF (PA_BCR + 10)
64#define BCR_ILCRG (PA_BCR + 12) 65#define BCR_ILCRG (PA_BCR + 12)
65 66
66#define IRQ_79C973 13 67#define IRQ_79C973 evt2irq(0x3a0)
67 68
68void init_7751se_IRQ(void); 69void init_7751se_IRQ(void);
69 70
diff --git a/arch/sh/include/mach-se/mach/se7780.h b/arch/sh/include/mach-se/mach/se7780.h
index 40e9b41458cd..bde357cf81bd 100644
--- a/arch/sh/include/mach-se/mach/se7780.h
+++ b/arch/sh/include/mach-se/mach/se7780.h
@@ -12,6 +12,7 @@
12 * License. See the file "COPYING" in the main directory of this archive 12 * License. See the file "COPYING" in the main directory of this archive
13 * for more details. 13 * for more details.
14 */ 14 */
15#include <linux/sh_intc.h>
15#include <asm/addrspace.h> 16#include <asm/addrspace.h>
16 17
17/* Box specific addresses. */ 18/* Box specific addresses. */
@@ -80,13 +81,13 @@
80#define IRQPOS_PCCPW (0 * 4) 81#define IRQPOS_PCCPW (0 * 4)
81 82
82/* IDE interrupt */ 83/* IDE interrupt */
83#define IRQ_IDE0 67 /* iVDR */ 84#define IRQ_IDE0 evt2irq(0xa60) /* iVDR */
84 85
85/* SMC interrupt */ 86/* SMC interrupt */
86#define SMC_IRQ 8 87#define SMC_IRQ evt2irq(0x300)
87 88
88/* SM501 interrupt */ 89/* SM501 interrupt */
89#define SM501_IRQ 0 90#define SM501_IRQ evt2irq(0x200)
90 91
91/* interrupt pin */ 92/* interrupt pin */
92#define IRQPIN_EXTINT1 0 /* IRQ0 pin */ 93#define IRQPIN_EXTINT1 0 /* IRQ0 pin */