aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-10-27 01:54:10 -0400
committerPaul Mundt <lethal@linux-sh.org>2010-10-27 01:54:10 -0400
commitd6138832ed8d86c5b8da63f40e8c6fffeeaf4129 (patch)
tree864967c28c6bdb9caff17dc68fa9ec0f536362d4 /arch/sh/boards
parent2803a1c681a808a7893539fa0b85558b2afc471a (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.c30
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
68static void enable_microdev_irq(unsigned int irq); 68static void disable_microdev_irq(struct irq_data *data)
69static void disable_microdev_irq(unsigned int irq);
70static void mask_and_ack_microdev(unsigned int);
71
72static 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
79static 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
94static void enable_microdev_irq(unsigned int irq) 84static 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
110static 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 */
120static void __init make_microdev_irq(unsigned int irq) 117static 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, &microdev_irq_type, handle_level_irq); 120 set_irq_chip_and_handler(irq, &microdev_irq_type, handle_level_irq);
124 disable_microdev_irq(irq); 121 disable_microdev_irq(irq_get_irq_data(irq));
125}
126
127static void mask_and_ack_microdev(unsigned int irq)
128{
129 disable_microdev_irq(irq);
130} 122}
131 123
132extern void __init init_microdev_irq(void) 124extern void __init init_microdev_irq(void)