Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 231387
b: refs/heads/master
c: a1015a1
h: refs/heads/master
i:
  231385: f422959
  231383: 004c409
v: v3
  • Loading branch information
Eric Miao committed Jan 15, 2011
1 parent ec7a56c commit 62b9228
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 28 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: 1b624fb64c2de44c00576cc9695680983f05c1ce
refs/heads/master: a1015a159530391fc498482656bab6c99dcd3c70
41 changes: 14 additions & 27 deletions trunk/arch/arm/mach-pxa/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,17 @@ static inline int cpu_has_ipr(void)
return !cpu_is_pxa25x();
}

static inline void __iomem *irq_base(int i)
{
static unsigned long phys_base[] = {
0x40d00000,
0x40d0009c,
0x40d00130,
};

return (void __iomem *)io_p2v(phys_base[i]);
}

static void pxa_mask_irq(struct irq_data *d)
{
void __iomem *base = irq_data_get_irq_chip_data(d);
Expand Down Expand Up @@ -108,25 +119,11 @@ static void pxa_ack_low_gpio(struct irq_data *d)
GEDR0 = (1 << (d->irq - IRQ_GPIO0));
}

static void pxa_mask_low_gpio(struct irq_data *d)
{
struct irq_desc *desc = irq_to_desc(d->irq);

desc->irq_data.chip->irq_mask(d);
}

static void pxa_unmask_low_gpio(struct irq_data *d)
{
struct irq_desc *desc = irq_to_desc(d->irq);

desc->irq_data.chip->irq_unmask(d);
}

static struct irq_chip pxa_low_gpio_chip = {
.name = "GPIO-l",
.irq_ack = pxa_ack_low_gpio,
.irq_mask = pxa_mask_low_gpio,
.irq_unmask = pxa_unmask_low_gpio,
.irq_mask = pxa_mask_irq,
.irq_unmask = pxa_unmask_irq,
.irq_set_type = pxa_set_low_gpio_type,
};

Expand All @@ -141,24 +138,14 @@ static void __init pxa_init_low_gpio_irq(set_wake_t fn)

for (irq = IRQ_GPIO0; irq <= IRQ_GPIO1; irq++) {
set_irq_chip(irq, &pxa_low_gpio_chip);
set_irq_chip_data(irq, irq_base(0));
set_irq_handler(irq, handle_edge_irq);
set_irq_flags(irq, IRQF_VALID);
}

pxa_low_gpio_chip.irq_set_wake = fn;
}

static inline void __iomem *irq_base(int i)
{
static unsigned long phys_base[] = {
0x40d00000,
0x40d0009c,
0x40d00130,
};

return (void __iomem *)io_p2v(phys_base[i]);
}

void __init pxa_init_irq(int irq_nr, set_wake_t fn)
{
int irq, i, n;
Expand Down

0 comments on commit 62b9228

Please sign in to comment.