diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-10-27 01:54:10 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-10-27 01:54:10 -0400 |
commit | d6138832ed8d86c5b8da63f40e8c6fffeeaf4129 (patch) | |
tree | 864967c28c6bdb9caff17dc68fa9ec0f536362d4 /arch/sh/boards | |
parent | 2803a1c681a808a7893539fa0b85558b2afc471a (diff) |
sh: mach-microdev: irq_data conversion.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards')
-rw-r--r-- | arch/sh/boards/mach-microdev/irq.c | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/arch/sh/boards/mach-microdev/irq.c b/arch/sh/boards/mach-microdev/irq.c index a26d16669aa2..c35001fd9032 100644 --- a/arch/sh/boards/mach-microdev/irq.c +++ b/arch/sh/boards/mach-microdev/irq.c | |||
@@ -65,19 +65,9 @@ static const struct { | |||
65 | # error Inconsistancy in defining the IRQ# for primary IDE! | 65 | # error Inconsistancy in defining the IRQ# for primary IDE! |
66 | #endif | 66 | #endif |
67 | 67 | ||
68 | static void enable_microdev_irq(unsigned int irq); | 68 | static void disable_microdev_irq(struct irq_data *data) |
69 | static void disable_microdev_irq(unsigned int irq); | ||
70 | static void mask_and_ack_microdev(unsigned int); | ||
71 | |||
72 | static struct irq_chip microdev_irq_type = { | ||
73 | .name = "MicroDev-IRQ", | ||
74 | .unmask = enable_microdev_irq, | ||
75 | .mask = disable_microdev_irq, | ||
76 | .ack = mask_and_ack_microdev, | ||
77 | }; | ||
78 | |||
79 | static void disable_microdev_irq(unsigned int irq) | ||
80 | { | 69 | { |
70 | unsigned int irq = data->irq; | ||
81 | unsigned int fpgaIrq; | 71 | unsigned int fpgaIrq; |
82 | 72 | ||
83 | if (irq >= NUM_EXTERNAL_IRQS) | 73 | if (irq >= NUM_EXTERNAL_IRQS) |
@@ -91,8 +81,9 @@ static void disable_microdev_irq(unsigned int irq) | |||
91 | __raw_writel(MICRODEV_FPGA_INTC_MASK(fpgaIrq), MICRODEV_FPGA_INTDSB_REG); | 81 | __raw_writel(MICRODEV_FPGA_INTC_MASK(fpgaIrq), MICRODEV_FPGA_INTDSB_REG); |
92 | } | 82 | } |
93 | 83 | ||
94 | static void enable_microdev_irq(unsigned int irq) | 84 | static void enable_microdev_irq(struct irq_data *data) |
95 | { | 85 | { |
86 | unsigned int irq = data->irq; | ||
96 | unsigned long priorityReg, priorities, pri; | 87 | unsigned long priorityReg, priorities, pri; |
97 | unsigned int fpgaIrq; | 88 | unsigned int fpgaIrq; |
98 | 89 | ||
@@ -116,17 +107,18 @@ static void enable_microdev_irq(unsigned int irq) | |||
116 | __raw_writel(MICRODEV_FPGA_INTC_MASK(fpgaIrq), MICRODEV_FPGA_INTENB_REG); | 107 | __raw_writel(MICRODEV_FPGA_INTC_MASK(fpgaIrq), MICRODEV_FPGA_INTENB_REG); |
117 | } | 108 | } |
118 | 109 | ||
110 | static struct irq_chip microdev_irq_type = { | ||
111 | .name = "MicroDev-IRQ", | ||
112 | .irq_unmask = enable_microdev_irq, | ||
113 | .irq_mask = disable_microdev_irq, | ||
114 | }; | ||
115 | |||
119 | /* This function sets the desired irq handler to be a MicroDev type */ | 116 | /* This function sets the desired irq handler to be a MicroDev type */ |
120 | static void __init make_microdev_irq(unsigned int irq) | 117 | static void __init make_microdev_irq(unsigned int irq) |
121 | { | 118 | { |
122 | disable_irq_nosync(irq); | 119 | disable_irq_nosync(irq); |
123 | set_irq_chip_and_handler(irq, µdev_irq_type, handle_level_irq); | 120 | set_irq_chip_and_handler(irq, µdev_irq_type, handle_level_irq); |
124 | disable_microdev_irq(irq); | 121 | disable_microdev_irq(irq_get_irq_data(irq)); |
125 | } | ||
126 | |||
127 | static void mask_and_ack_microdev(unsigned int irq) | ||
128 | { | ||
129 | disable_microdev_irq(irq); | ||
130 | } | 122 | } |
131 | 123 | ||
132 | extern void __init init_microdev_irq(void) | 124 | extern void __init init_microdev_irq(void) |