omap24xx: Some retu/tahvo IRQ fixes
[openwrt/staging/lynxis/omap.git] / target / linux / omap24xx / patches-3.1 / 252-cbus-retu-tahvo-ack-fix.patch
1 Index: linux-3.1.1/drivers/cbus/retu.c
2 ===================================================================
3 --- linux-3.1.1.orig/drivers/cbus/retu.c 2011-11-17 18:47:59.453004678 +0100
4 +++ linux-3.1.1/drivers/cbus/retu.c 2011-11-17 18:49:03.180787673 +0100
5 @@ -54,8 +54,6 @@ struct retu {
6 int irq;
7
8 int ack;
9 - bool ack_pending;
10 -
11 int mask;
12 bool mask_pending;
13
14 @@ -238,7 +236,6 @@ static void retu_irq_ack(struct irq_data
15 int irq = data->irq;
16
17 retu->ack |= (1 << (irq - retu->irq_base));
18 - retu->ack_pending = true;
19 }
20
21 static void retu_bus_lock(struct irq_data *data)
22 @@ -257,9 +254,9 @@ static void retu_bus_sync_unlock(struct
23 retu->mask_pending = false;
24 }
25
26 - if (retu->ack_pending) {
27 + if (retu->ack) {
28 __retu_write_reg(retu, RETU_REG_IDR, retu->ack);
29 - retu->ack_pending = false;
30 + retu->ack = 0;
31 }
32
33 mutex_unlock(&retu->mutex);
34 Index: linux-3.1.1/drivers/cbus/tahvo.c
35 ===================================================================
36 --- linux-3.1.1.orig/drivers/cbus/tahvo.c 2011-11-17 18:47:59.437004733 +0100
37 +++ linux-3.1.1/drivers/cbus/tahvo.c 2011-11-17 18:51:03.708374259 +0100
38 @@ -52,7 +52,6 @@ struct tahvo {
39 int mask;
40
41 unsigned int mask_pending:1;
42 - unsigned int ack_pending:1;
43 unsigned int is_betty:1;
44 };
45
46 @@ -177,9 +176,9 @@ static void tahvo_irq_bus_sync_unlock(st
47 tahvo->mask_pending = false;
48 }
49
50 - if (tahvo->ack_pending) {
51 + if (tahvo->ack) {
52 __tahvo_write_reg(tahvo, TAHVO_REG_IDR, tahvo->ack);
53 - tahvo->ack_pending = false;
54 + tahvo->ack = 0;
55 }
56
57 mutex_unlock(&tahvo->mutex);
58 @@ -209,7 +208,6 @@ static void tahvo_irq_ack(struct irq_dat
59 int irq = data->irq;
60
61 tahvo->ack |= (1 << (irq - tahvo->irq_base));
62 - tahvo->ack_pending = true;
63 }
64
65 static struct irq_chip tahvo_irq_chip = {