diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-10-27 02:30:07 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-10-27 02:30:07 -0400 |
commit | 15ff2c67ab5c45c7382374bc43a5ad218a36045f (patch) | |
tree | 0cd183c5d0dd740ee13bec53220bd32fed75450b /arch/sh/boards/mach-se/7206/irq.c | |
parent | e28abafbab4205bda07087ea29cde39a14ba82c9 (diff) |
sh: mach-se: irq_data conversion.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards/mach-se/7206/irq.c')
-rw-r--r-- | arch/sh/boards/mach-se/7206/irq.c | 20 |
1 files changed, 11 insertions, 9 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 | ||
28 | static void disable_se7206_irq(unsigned int irq) | 28 | static 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 | ||
58 | static void enable_se7206_irq(unsigned int irq) | 59 | static 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 | ||
89 | static void eoi_se7206_irq(unsigned int irq) | 91 | static 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 | ||
116 | static struct irq_chip se7206_irq_chip __read_mostly = { | 119 | static 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 | ||
124 | static void make_se7206_irq(unsigned int irq) | 126 | static 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 | /* |