aboutsummaryrefslogtreecommitdiffstats
path: root/arch/avr32/mach-at32ap/extint.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-02-06 11:29:01 -0500
committerThomas Gleixner <tglx@linutronix.de>2011-03-24 15:35:54 -0400
commit7776e233ef32d9e8152dbb31328367c65288abcf (patch)
tree35e601935bfaffb5345221807b6e4dc04d6b191f /arch/avr32/mach-at32ap/extint.c
parenta2e8461a2ce5e8140b7374eb68af0d09e36e07ff (diff)
avr32: At32ap: Convert extint irq_chip to new functions
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com> LKML-Reference: <20110206163008.996220791@linutronix.de>
Diffstat (limited to 'arch/avr32/mach-at32ap/extint.c')
-rw-r--r--arch/avr32/mach-at32ap/extint.c45
1 files changed, 23 insertions, 22 deletions
diff --git a/arch/avr32/mach-at32ap/extint.c b/arch/avr32/mach-at32ap/extint.c
index e9d12058ffd3..bf3b2c59c8e1 100644
--- a/arch/avr32/mach-at32ap/extint.c
+++ b/arch/avr32/mach-at32ap/extint.c
@@ -61,35 +61,36 @@ struct eic {
61static struct eic *nmi_eic; 61static struct eic *nmi_eic;
62static bool nmi_enabled; 62static bool nmi_enabled;
63 63
64static void eic_ack_irq(unsigned int irq) 64static void eic_ack_irq(struct irq_chip *d)
65{ 65{
66 struct eic *eic = get_irq_chip_data(irq); 66 struct eic *eic = irq_data_get_irq_chip_data(data);
67 eic_writel(eic, ICR, 1 << (irq - eic->first_irq)); 67 eic_writel(eic, ICR, 1 << (d->irq - eic->first_irq));
68} 68}
69 69
70static void eic_mask_irq(unsigned int irq) 70static void eic_mask_irq(struct irq_chip *d)
71{ 71{
72 struct eic *eic = get_irq_chip_data(irq); 72 struct eic *eic = irq_data_get_irq_chip_data(data);
73 eic_writel(eic, IDR, 1 << (irq - eic->first_irq)); 73 eic_writel(eic, IDR, 1 << (d->irq - eic->first_irq));
74} 74}
75 75
76static void eic_mask_ack_irq(unsigned int irq) 76static void eic_mask_ack_irq(struct irq_chip *d)
77{ 77{
78 struct eic *eic = get_irq_chip_data(irq); 78 struct eic *eic = irq_data_get_irq_chip_data(data);
79 eic_writel(eic, ICR, 1 << (irq - eic->first_irq)); 79 eic_writel(eic, ICR, 1 << (d->irq - eic->first_irq));
80 eic_writel(eic, IDR, 1 << (irq - eic->first_irq)); 80 eic_writel(eic, IDR, 1 << (d->irq - eic->first_irq));
81} 81}
82 82
83static void eic_unmask_irq(unsigned int irq) 83static void eic_unmask_irq(struct irq_chip *d)
84{ 84{
85 struct eic *eic = get_irq_chip_data(irq); 85 struct eic *eic = irq_data_get_irq_chip_data(data);
86 eic_writel(eic, IER, 1 << (irq - eic->first_irq)); 86 eic_writel(eic, IER, 1 << (d->irq - eic->first_irq));
87} 87}
88 88
89static int eic_set_irq_type(unsigned int irq, unsigned int flow_type) 89static int eic_set_irq_type(struct irq_chip *d, unsigned int flow_type)
90{ 90{
91 struct eic *eic = get_irq_chip_data(irq); 91 struct eic *eic = irq_data_get_irq_chip_data(data);
92 struct irq_desc *desc; 92 struct irq_desc *desc;
93 unsigned int irq = d->irq;
93 unsigned int i = irq - eic->first_irq; 94 unsigned int i = irq - eic->first_irq;
94 u32 mode, edge, level; 95 u32 mode, edge, level;
95 int ret = 0; 96 int ret = 0;
@@ -98,7 +99,7 @@ static int eic_set_irq_type(unsigned int irq, unsigned int flow_type)
98 if (flow_type == IRQ_TYPE_NONE) 99 if (flow_type == IRQ_TYPE_NONE)
99 flow_type = IRQ_TYPE_LEVEL_LOW; 100 flow_type = IRQ_TYPE_LEVEL_LOW;
100 101
101 desc = &irq_desc[irq]; 102 desc = irq_to_desc(irq);
102 103
103 mode = eic_readl(eic, MODE); 104 mode = eic_readl(eic, MODE);
104 edge = eic_readl(eic, EDGE); 105 edge = eic_readl(eic, EDGE);
@@ -145,16 +146,16 @@ static int eic_set_irq_type(unsigned int irq, unsigned int flow_type)
145 146
146static struct irq_chip eic_chip = { 147static struct irq_chip eic_chip = {
147 .name = "eic", 148 .name = "eic",
148 .ack = eic_ack_irq, 149 .irq_ack = eic_ack_irq,
149 .mask = eic_mask_irq, 150 .irq_mask = eic_mask_irq,
150 .mask_ack = eic_mask_ack_irq, 151 .irq_mask_ack = eic_mask_ack_irq,
151 .unmask = eic_unmask_irq, 152 .irq_unmask = eic_unmask_irq,
152 .set_type = eic_set_irq_type, 153 .irq_set_type = eic_set_irq_type,
153}; 154};
154 155
155static void demux_eic_irq(unsigned int irq, struct irq_desc *desc) 156static void demux_eic_irq(unsigned int irq, struct irq_desc *desc)
156{ 157{
157 struct eic *eic = desc->handler_data; 158 struct eic *eic = get_irq_desc_data(desc);
158 unsigned long status, pending; 159 unsigned long status, pending;
159 unsigned int i; 160 unsigned int i;
160 161