aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2011-03-08 17:27:07 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-03-09 19:04:04 -0500
commit73909af7367a4daf2395846e776e0b326bd4e23b (patch)
tree18a8281b6618500215919781130cb5db47fd782c /arch
parent42a07ae29a996b55e715a929786c12afc604d7c7 (diff)
powerpc: sysdev/xilinx_intc irq_data conversion.
Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/sysdev/xilinx_intc.c48
1 files changed, 25 insertions, 23 deletions
diff --git a/arch/powerpc/sysdev/xilinx_intc.c b/arch/powerpc/sysdev/xilinx_intc.c
index 1e0ccfaf403e..7436f3ed4df6 100644
--- a/arch/powerpc/sysdev/xilinx_intc.c
+++ b/arch/powerpc/sysdev/xilinx_intc.c
@@ -69,17 +69,17 @@ static unsigned char xilinx_intc_map_senses[] = {
69 * 69 *
70 * IRQ Chip common (across level and edge) operations 70 * IRQ Chip common (across level and edge) operations
71 */ 71 */
72static void xilinx_intc_mask(unsigned int virq) 72static void xilinx_intc_mask(struct irq_data *d)
73{ 73{
74 int irq = virq_to_hw(virq); 74 int irq = virq_to_hw(d->irq);
75 void * regs = get_irq_chip_data(virq); 75 void * regs = irq_data_get_irq_chip_data(d);
76 pr_debug("mask: %d\n", irq); 76 pr_debug("mask: %d\n", irq);
77 out_be32(regs + XINTC_CIE, 1 << irq); 77 out_be32(regs + XINTC_CIE, 1 << irq);
78} 78}
79 79
80static int xilinx_intc_set_type(unsigned int virq, unsigned int flow_type) 80static int xilinx_intc_set_type(struct irq_data *d, unsigned int flow_type)
81{ 81{
82 struct irq_desc *desc = irq_to_desc(virq); 82 struct irq_desc *desc = irq_to_desc(d->irq);
83 83
84 desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL); 84 desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL);
85 desc->status |= flow_type & IRQ_TYPE_SENSE_MASK; 85 desc->status |= flow_type & IRQ_TYPE_SENSE_MASK;
@@ -91,10 +91,10 @@ static int xilinx_intc_set_type(unsigned int virq, unsigned int flow_type)
91/* 91/*
92 * IRQ Chip level operations 92 * IRQ Chip level operations
93 */ 93 */
94static void xilinx_intc_level_unmask(unsigned int virq) 94static void xilinx_intc_level_unmask(struct irq_data *d)
95{ 95{
96 int irq = virq_to_hw(virq); 96 int irq = virq_to_hw(d->irq);
97 void * regs = get_irq_chip_data(virq); 97 void * regs = irq_data_get_irq_chip_data(d);
98 pr_debug("unmask: %d\n", irq); 98 pr_debug("unmask: %d\n", irq);
99 out_be32(regs + XINTC_SIE, 1 << irq); 99 out_be32(regs + XINTC_SIE, 1 << irq);
100 100
@@ -107,37 +107,37 @@ static void xilinx_intc_level_unmask(unsigned int virq)
107 107
108static struct irq_chip xilinx_intc_level_irqchip = { 108static struct irq_chip xilinx_intc_level_irqchip = {
109 .name = "Xilinx Level INTC", 109 .name = "Xilinx Level INTC",
110 .mask = xilinx_intc_mask, 110 .irq_mask = xilinx_intc_mask,
111 .mask_ack = xilinx_intc_mask, 111 .irq_mask_ack = xilinx_intc_mask,
112 .unmask = xilinx_intc_level_unmask, 112 .irq_unmask = xilinx_intc_level_unmask,
113 .set_type = xilinx_intc_set_type, 113 .irq_set_type = xilinx_intc_set_type,
114}; 114};
115 115
116/* 116/*
117 * IRQ Chip edge operations 117 * IRQ Chip edge operations
118 */ 118 */
119static void xilinx_intc_edge_unmask(unsigned int virq) 119static void xilinx_intc_edge_unmask(struct irq_data *d)
120{ 120{
121 int irq = virq_to_hw(virq); 121 int irq = virq_to_hw(d->irq);
122 void *regs = get_irq_chip_data(virq); 122 void *regs = irq_data_get_irq_chip_data(d);
123 pr_debug("unmask: %d\n", irq); 123 pr_debug("unmask: %d\n", irq);
124 out_be32(regs + XINTC_SIE, 1 << irq); 124 out_be32(regs + XINTC_SIE, 1 << irq);
125} 125}
126 126
127static void xilinx_intc_edge_ack(unsigned int virq) 127static void xilinx_intc_edge_ack(struct irq_data *d)
128{ 128{
129 int irq = virq_to_hw(virq); 129 int irq = virq_to_hw(d->irq);
130 void * regs = get_irq_chip_data(virq); 130 void * regs = irq_data_get_irq_chip_data(d);
131 pr_debug("ack: %d\n", irq); 131 pr_debug("ack: %d\n", irq);
132 out_be32(regs + XINTC_IAR, 1 << irq); 132 out_be32(regs + XINTC_IAR, 1 << irq);
133} 133}
134 134
135static struct irq_chip xilinx_intc_edge_irqchip = { 135static struct irq_chip xilinx_intc_edge_irqchip = {
136 .name = "Xilinx Edge INTC", 136 .name = "Xilinx Edge INTC",
137 .mask = xilinx_intc_mask, 137 .irq_mask = xilinx_intc_mask,
138 .unmask = xilinx_intc_edge_unmask, 138 .irq_unmask = xilinx_intc_edge_unmask,
139 .ack = xilinx_intc_edge_ack, 139 .irq_ack = xilinx_intc_edge_ack,
140 .set_type = xilinx_intc_set_type, 140 .irq_set_type = xilinx_intc_set_type,
141}; 141};
142 142
143/* 143/*
@@ -229,12 +229,14 @@ int xilinx_intc_get_irq(void)
229 */ 229 */
230static void xilinx_i8259_cascade(unsigned int irq, struct irq_desc *desc) 230static void xilinx_i8259_cascade(unsigned int irq, struct irq_desc *desc)
231{ 231{
232 struct irq_chip *chip = get_irq_desc_chip(desc);
232 unsigned int cascade_irq = i8259_irq(); 233 unsigned int cascade_irq = i8259_irq();
234
233 if (cascade_irq) 235 if (cascade_irq)
234 generic_handle_irq(cascade_irq); 236 generic_handle_irq(cascade_irq);
235 237
236 /* Let xilinx_intc end the interrupt */ 238 /* Let xilinx_intc end the interrupt */
237 desc->chip->unmask(irq); 239 chip->irq_unmask(&desc->irq_data);
238} 240}
239 241
240static void __init xilinx_i8259_setup_cascade(void) 242static void __init xilinx_i8259_setup_cascade(void)