aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-10-27 02:30:07 -0400
committerPaul Mundt <lethal@linux-sh.org>2010-10-27 02:30:07 -0400
commit15ff2c67ab5c45c7382374bc43a5ad218a36045f (patch)
tree0cd183c5d0dd740ee13bec53220bd32fed75450b /arch/sh
parente28abafbab4205bda07087ea29cde39a14ba82c9 (diff)
sh: mach-se: irq_data conversion.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/boards/mach-se/7206/irq.c20
-rw-r--r--arch/sh/boards/mach-se/7343/irq.c15
-rw-r--r--arch/sh/boards/mach-se/7722/irq.c15
-rw-r--r--arch/sh/boards/mach-se/7724/irq.c13
4 files changed, 32 insertions, 31 deletions
diff --git a/arch/sh/boards/mach-se/7206/irq.c b/arch/sh/boards/mach-se/7206/irq.c
index 8d82175d83ab..883b21eacaa6 100644
--- a/arch/sh/boards/mach-se/7206/irq.c
+++ b/arch/sh/boards/mach-se/7206/irq.c
@@ -25,8 +25,9 @@
25#define INTC_IPR01 0xfffe0818 25#define INTC_IPR01 0xfffe0818
26#define INTC_ICR1 0xfffe0802 26#define INTC_ICR1 0xfffe0802
27 27
28static void disable_se7206_irq(unsigned int irq) 28static void disable_se7206_irq(struct irq_data *data)
29{ 29{
30 unsigned int irq = data->irq;
30 unsigned short val; 31 unsigned short val;
31 unsigned short mask = 0xffff ^ (0x0f << 4 * (3 - (IRQ0_IRQ - irq))); 32 unsigned short mask = 0xffff ^ (0x0f << 4 * (3 - (IRQ0_IRQ - irq)));
32 unsigned short msk0,msk1; 33 unsigned short msk0,msk1;
@@ -55,8 +56,9 @@ static void disable_se7206_irq(unsigned int irq)
55 __raw_writew(msk1, INTMSK1); 56 __raw_writew(msk1, INTMSK1);
56} 57}
57 58
58static void enable_se7206_irq(unsigned int irq) 59static void enable_se7206_irq(struct irq_data *data)
59{ 60{
61 unsigned int irq = data->irq;
60 unsigned short val; 62 unsigned short val;
61 unsigned short value = (0x0001 << 4 * (3 - (IRQ0_IRQ - irq))); 63 unsigned short value = (0x0001 << 4 * (3 - (IRQ0_IRQ - irq)));
62 unsigned short msk0,msk1; 64 unsigned short msk0,msk1;
@@ -86,13 +88,14 @@ static void enable_se7206_irq(unsigned int irq)
86 __raw_writew(msk1, INTMSK1); 88 __raw_writew(msk1, INTMSK1);
87} 89}
88 90
89static void eoi_se7206_irq(unsigned int irq) 91static void eoi_se7206_irq(struct irq_data *data)
90{ 92{
91 unsigned short sts0,sts1; 93 unsigned short sts0,sts1;
94 unsigned int irq = data->irq;
92 struct irq_desc *desc = irq_to_desc(irq); 95 struct irq_desc *desc = irq_to_desc(irq);
93 96
94 if (!(desc->status & (IRQ_DISABLED|IRQ_INPROGRESS))) 97 if (!(desc->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
95 enable_se7206_irq(irq); 98 enable_se7206_irq(data);
96 /* FPGA isr clear */ 99 /* FPGA isr clear */
97 sts0 = __raw_readw(INTSTS0); 100 sts0 = __raw_readw(INTSTS0);
98 sts1 = __raw_readw(INTSTS1); 101 sts1 = __raw_readw(INTSTS1);
@@ -115,10 +118,9 @@ static void eoi_se7206_irq(unsigned int irq)
115 118
116static struct irq_chip se7206_irq_chip __read_mostly = { 119static struct irq_chip se7206_irq_chip __read_mostly = {
117 .name = "SE7206-FPGA", 120 .name = "SE7206-FPGA",
118 .mask = disable_se7206_irq, 121 .irq_mask = disable_se7206_irq,
119 .unmask = enable_se7206_irq, 122 .irq_unmask = enable_se7206_irq,
120 .mask_ack = disable_se7206_irq, 123 .irq_eoi = eoi_se7206_irq,
121 .eoi = eoi_se7206_irq,
122}; 124};
123 125
124static void make_se7206_irq(unsigned int irq) 126static void make_se7206_irq(unsigned int irq)
@@ -126,7 +128,7 @@ static void make_se7206_irq(unsigned int irq)
126 disable_irq_nosync(irq); 128 disable_irq_nosync(irq);
127 set_irq_chip_and_handler_name(irq, &se7206_irq_chip, 129 set_irq_chip_and_handler_name(irq, &se7206_irq_chip,
128 handle_level_irq, "level"); 130 handle_level_irq, "level");
129 disable_se7206_irq(irq); 131 disable_se7206_irq(irq_get_irq_data(irq));
130} 132}
131 133
132/* 134/*
diff --git a/arch/sh/boards/mach-se/7343/irq.c b/arch/sh/boards/mach-se/7343/irq.c
index d4305c26e9f7..76255a19417f 100644
--- a/arch/sh/boards/mach-se/7343/irq.c
+++ b/arch/sh/boards/mach-se/7343/irq.c
@@ -18,23 +18,22 @@
18 18
19unsigned int se7343_fpga_irq[SE7343_FPGA_IRQ_NR] = { 0, }; 19unsigned int se7343_fpga_irq[SE7343_FPGA_IRQ_NR] = { 0, };
20 20
21static void disable_se7343_irq(unsigned int irq) 21static void disable_se7343_irq(struct irq_data *data)
22{ 22{
23 unsigned int bit = (unsigned int)get_irq_chip_data(irq); 23 unsigned int bit = (unsigned int)irq_data_get_irq_chip_data(data);
24 __raw_writew(__raw_readw(PA_CPLD_IMSK) | 1 << bit, PA_CPLD_IMSK); 24 __raw_writew(__raw_readw(PA_CPLD_IMSK) | 1 << bit, PA_CPLD_IMSK);
25} 25}
26 26
27static void enable_se7343_irq(unsigned int irq) 27static void enable_se7343_irq(struct irq_data *data)
28{ 28{
29 unsigned int bit = (unsigned int)get_irq_chip_data(irq); 29 unsigned int bit = (unsigned int)irq_data_get_irq_chip_data(data);
30 __raw_writew(__raw_readw(PA_CPLD_IMSK) & ~(1 << bit), PA_CPLD_IMSK); 30 __raw_writew(__raw_readw(PA_CPLD_IMSK) & ~(1 << bit), PA_CPLD_IMSK);
31} 31}
32 32
33static struct irq_chip se7343_irq_chip __read_mostly = { 33static struct irq_chip se7343_irq_chip __read_mostly = {
34 .name = "SE7343-FPGA", 34 .name = "SE7343-FPGA",
35 .mask = disable_se7343_irq, 35 .irq_mask = disable_se7343_irq,
36 .unmask = enable_se7343_irq, 36 .irq_unmask = enable_se7343_irq,
37 .mask_ack = disable_se7343_irq,
38}; 37};
39 38
40static void se7343_irq_demux(unsigned int irq, struct irq_desc *desc) 39static void se7343_irq_demux(unsigned int irq, struct irq_desc *desc)
diff --git a/arch/sh/boards/mach-se/7722/irq.c b/arch/sh/boards/mach-se/7722/irq.c
index 61605db04ee6..c013f95628ed 100644
--- a/arch/sh/boards/mach-se/7722/irq.c
+++ b/arch/sh/boards/mach-se/7722/irq.c
@@ -18,23 +18,22 @@
18 18
19unsigned int se7722_fpga_irq[SE7722_FPGA_IRQ_NR] = { 0, }; 19unsigned int se7722_fpga_irq[SE7722_FPGA_IRQ_NR] = { 0, };
20 20
21static void disable_se7722_irq(unsigned int irq) 21static void disable_se7722_irq(struct irq_data *data)
22{ 22{
23 unsigned int bit = (unsigned int)get_irq_chip_data(irq); 23 unsigned int bit = (unsigned int)irq_data_get_irq_chip_data(data);
24 __raw_writew(__raw_readw(IRQ01_MASK) | 1 << bit, IRQ01_MASK); 24 __raw_writew(__raw_readw(IRQ01_MASK) | 1 << bit, IRQ01_MASK);
25} 25}
26 26
27static void enable_se7722_irq(unsigned int irq) 27static void enable_se7722_irq(struct irq_data *data)
28{ 28{
29 unsigned int bit = (unsigned int)get_irq_chip_data(irq); 29 unsigned int bit = (unsigned int)irq_data_get_irq_chip_data(data);
30 __raw_writew(__raw_readw(IRQ01_MASK) & ~(1 << bit), IRQ01_MASK); 30 __raw_writew(__raw_readw(IRQ01_MASK) & ~(1 << bit), IRQ01_MASK);
31} 31}
32 32
33static struct irq_chip se7722_irq_chip __read_mostly = { 33static struct irq_chip se7722_irq_chip __read_mostly = {
34 .name = "SE7722-FPGA", 34 .name = "SE7722-FPGA",
35 .mask = disable_se7722_irq, 35 .irq_mask = disable_se7722_irq,
36 .unmask = enable_se7722_irq, 36 .irq_unmask = enable_se7722_irq,
37 .mask_ack = disable_se7722_irq,
38}; 37};
39 38
40static void se7722_irq_demux(unsigned int irq, struct irq_desc *desc) 39static void se7722_irq_demux(unsigned int irq, struct irq_desc *desc)
diff --git a/arch/sh/boards/mach-se/7724/irq.c b/arch/sh/boards/mach-se/7724/irq.c
index 0942be2daef6..5bd87c22b65b 100644
--- a/arch/sh/boards/mach-se/7724/irq.c
+++ b/arch/sh/boards/mach-se/7724/irq.c
@@ -68,25 +68,26 @@ static struct fpga_irq get_fpga_irq(unsigned int irq)
68 return set; 68 return set;
69} 69}
70 70
71static void disable_se7724_irq(unsigned int irq) 71static void disable_se7724_irq(struct irq_data *data)
72{ 72{
73 unsigned int irq = data->irq;
73 struct fpga_irq set = get_fpga_irq(fpga2irq(irq)); 74 struct fpga_irq set = get_fpga_irq(fpga2irq(irq));
74 unsigned int bit = irq - set.base; 75 unsigned int bit = irq - set.base;
75 __raw_writew(__raw_readw(set.mraddr) | 0x0001 << bit, set.mraddr); 76 __raw_writew(__raw_readw(set.mraddr) | 0x0001 << bit, set.mraddr);
76} 77}
77 78
78static void enable_se7724_irq(unsigned int irq) 79static void enable_se7724_irq(struct irq_data *data)
79{ 80{
81 unsigned int irq = data->irq;
80 struct fpga_irq set = get_fpga_irq(fpga2irq(irq)); 82 struct fpga_irq set = get_fpga_irq(fpga2irq(irq));
81 unsigned int bit = irq - set.base; 83 unsigned int bit = irq - set.base;
82 __raw_writew(__raw_readw(set.mraddr) & ~(0x0001 << bit), set.mraddr); 84 __raw_writew(__raw_readw(set.mraddr) & ~(0x0001 << bit), set.mraddr);
83} 85}
84 86
85static struct irq_chip se7724_irq_chip __read_mostly = { 87static struct irq_chip se7724_irq_chip __read_mostly = {
86 .name = "SE7724-FPGA", 88 .name = "SE7724-FPGA",
87 .mask = disable_se7724_irq, 89 .irq_mask = disable_se7724_irq,
88 .unmask = enable_se7724_irq, 90 .irq_unmask = enable_se7724_irq,
89 .mask_ack = disable_se7724_irq,
90}; 91};
91 92
92static void se7724_irq_demux(unsigned int irq, struct irq_desc *desc) 93static void se7724_irq_demux(unsigned int irq, struct irq_desc *desc)