Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 91215
b: refs/heads/master
c: 7a26d3a
h: refs/heads/master
i:
  91213: c709032
  91211: 8845db8
  91207: 1ad0c73
  91199: 8e6c4e5
v: v3
  • Loading branch information
eric miao authored and Russell King committed Apr 19, 2008
1 parent 85e54f9 commit c5745b0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 59 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d72b1370b0b45f1fabda5ae4d603773d8a2c226a
refs/heads/master: 7a26d3a33fd9adcbfd4fa2ca2d7e8a8272817935
74 changes: 16 additions & 58 deletions trunk/arch/arm/mach-pxa/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,73 +178,31 @@ static struct irq_chip pxa_low_gpio_chip = {
* Demux handler for GPIO>=2 edge detect interrupts
*/

#define GEDR_BITS (sizeof(gedr) * BITS_PER_BYTE)

static void pxa_gpio_demux_handler(unsigned int irq, struct irq_desc *desc)
{
unsigned int mask;
int loop;
int loop, bit, n;
unsigned long gedr[4];

do {
loop = 0;
gedr[0] = GEDR0 & GPIO_IRQ_mask[0] & ~3;
gedr[1] = GEDR1 & GPIO_IRQ_mask[1];
gedr[2] = GEDR2 & GPIO_IRQ_mask[2];
gedr[3] = GEDR3 & GPIO_IRQ_mask[3];

mask = GEDR0 & GPIO_IRQ_mask[0] & ~3;
if (mask) {
GEDR0 = mask;
irq = IRQ_GPIO(2);
desc = irq_desc + irq;
mask >>= 2;
do {
if (mask & 1)
desc_handle_irq(irq, desc);
irq++;
desc++;
mask >>= 1;
} while (mask);
loop = 1;
}
GEDR0 = gedr[0]; GEDR1 = gedr[1];
GEDR2 = gedr[2]; GEDR3 = gedr[3];

mask = GEDR1 & GPIO_IRQ_mask[1];
if (mask) {
GEDR1 = mask;
irq = IRQ_GPIO(32);
desc = irq_desc + irq;
do {
if (mask & 1)
desc_handle_irq(irq, desc);
irq++;
desc++;
mask >>= 1;
} while (mask);
loop = 0;
bit = find_first_bit(gedr, GEDR_BITS);
while (bit < GEDR_BITS) {
loop = 1;
}

mask = GEDR2 & GPIO_IRQ_mask[2];
if (mask) {
GEDR2 = mask;
irq = IRQ_GPIO(64);
desc = irq_desc + irq;
do {
if (mask & 1)
desc_handle_irq(irq, desc);
irq++;
desc++;
mask >>= 1;
} while (mask);
loop = 1;
}
n = PXA_GPIO_IRQ_BASE + bit;
desc_handle_irq(n, irq_desc + n);

mask = GEDR3 & GPIO_IRQ_mask[3];
if (mask) {
GEDR3 = mask;
irq = IRQ_GPIO(96);
desc = irq_desc + irq;
do {
if (mask & 1)
desc_handle_irq(irq, desc);
irq++;
desc++;
mask >>= 1;
} while (mask);
loop = 1;
bit = find_next_bit(gedr, GEDR_BITS, bit + 1);
}
} while (loop);
}
Expand Down

0 comments on commit c5745b0

Please sign in to comment.