Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 231329
b: refs/heads/master
c: 5638538
h: refs/heads/master
i:
  231327: a3bfe33
v: v3
  • Loading branch information
Lennert Buytenhek committed Jan 13, 2011
1 parent f17927c commit 4667f26
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 29 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: 3b7cff6604768bd561b032a02c38746707cbd3d1
refs/heads/master: 5638538117ea81063b0611a7374c0d65133860ec
56 changes: 28 additions & 28 deletions trunk/arch/arm/mach-lpc32xx/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,38 +191,38 @@ static void get_controller(unsigned int irq, unsigned int *base,
}
}

static void lpc32xx_mask_irq(unsigned int irq)
static void lpc32xx_mask_irq(struct irq_data *d)
{
unsigned int reg, ctrl, mask;

get_controller(irq, &ctrl, &mask);
get_controller(d->irq, &ctrl, &mask);

reg = __raw_readl(LPC32XX_INTC_MASK(ctrl)) & ~mask;
__raw_writel(reg, LPC32XX_INTC_MASK(ctrl));
}

static void lpc32xx_unmask_irq(unsigned int irq)
static void lpc32xx_unmask_irq(struct irq_data *d)
{
unsigned int reg, ctrl, mask;

get_controller(irq, &ctrl, &mask);
get_controller(d->irq, &ctrl, &mask);

reg = __raw_readl(LPC32XX_INTC_MASK(ctrl)) | mask;
__raw_writel(reg, LPC32XX_INTC_MASK(ctrl));
}

static void lpc32xx_ack_irq(unsigned int irq)
static void lpc32xx_ack_irq(struct irq_data *d)
{
unsigned int ctrl, mask;

get_controller(irq, &ctrl, &mask);
get_controller(d->irq, &ctrl, &mask);

__raw_writel(mask, LPC32XX_INTC_RAW_STAT(ctrl));

/* Also need to clear pending wake event */
if (lpc32xx_events[irq].mask != 0)
__raw_writel(lpc32xx_events[irq].mask,
lpc32xx_events[irq].event_group->rawstat_reg);
if (lpc32xx_events[d->irq].mask != 0)
__raw_writel(lpc32xx_events[d->irq].mask,
lpc32xx_events[d->irq].event_group->rawstat_reg);
}

static void __lpc32xx_set_irq_type(unsigned int irq, int use_high_level,
Expand Down Expand Up @@ -261,27 +261,27 @@ static void __lpc32xx_set_irq_type(unsigned int irq, int use_high_level,
}
}

static int lpc32xx_set_irq_type(unsigned int irq, unsigned int type)
static int lpc32xx_set_irq_type(struct irq_data *d, unsigned int type)
{
switch (type) {
case IRQ_TYPE_EDGE_RISING:
/* Rising edge sensitive */
__lpc32xx_set_irq_type(irq, 1, 1);
__lpc32xx_set_irq_type(d->irq, 1, 1);
break;

case IRQ_TYPE_EDGE_FALLING:
/* Falling edge sensitive */
__lpc32xx_set_irq_type(irq, 0, 1);
__lpc32xx_set_irq_type(d->irq, 0, 1);
break;

case IRQ_TYPE_LEVEL_LOW:
/* Low level sensitive */
__lpc32xx_set_irq_type(irq, 0, 0);
__lpc32xx_set_irq_type(d->irq, 0, 0);
break;

case IRQ_TYPE_LEVEL_HIGH:
/* High level sensitive */
__lpc32xx_set_irq_type(irq, 1, 0);
__lpc32xx_set_irq_type(d->irq, 1, 0);
break;

/* Other modes are not supported */
Expand All @@ -290,33 +290,33 @@ static int lpc32xx_set_irq_type(unsigned int irq, unsigned int type)
}

/* Ok to use the level handler for all types */
set_irq_handler(irq, handle_level_irq);
set_irq_handler(d->irq, handle_level_irq);

return 0;
}

static int lpc32xx_irq_wake(unsigned int irqno, unsigned int state)
static int lpc32xx_irq_wake(struct irq_data *d, unsigned int state)
{
unsigned long eventreg;

if (lpc32xx_events[irqno].mask != 0) {
eventreg = __raw_readl(lpc32xx_events[irqno].
if (lpc32xx_events[d->irq].mask != 0) {
eventreg = __raw_readl(lpc32xx_events[d->irq].
event_group->enab_reg);

if (state)
eventreg |= lpc32xx_events[irqno].mask;
eventreg |= lpc32xx_events[d->irq].mask;
else
eventreg &= ~lpc32xx_events[irqno].mask;
eventreg &= ~lpc32xx_events[d->irq].mask;

__raw_writel(eventreg,
lpc32xx_events[irqno].event_group->enab_reg);
lpc32xx_events[d->irq].event_group->enab_reg);

return 0;
}

/* Clear event */
__raw_writel(lpc32xx_events[irqno].mask,
lpc32xx_events[irqno].event_group->rawstat_reg);
__raw_writel(lpc32xx_events[d->irq].mask,
lpc32xx_events[d->irq].event_group->rawstat_reg);

return -ENODEV;
}
Expand All @@ -336,11 +336,11 @@ static void __init lpc32xx_set_default_mappings(unsigned int apr,
}

static struct irq_chip lpc32xx_irq_chip = {
.ack = lpc32xx_ack_irq,
.mask = lpc32xx_mask_irq,
.unmask = lpc32xx_unmask_irq,
.set_type = lpc32xx_set_irq_type,
.set_wake = lpc32xx_irq_wake
.irq_ack = lpc32xx_ack_irq,
.irq_mask = lpc32xx_mask_irq,
.irq_unmask = lpc32xx_unmask_irq,
.irq_set_type = lpc32xx_set_irq_type,
.irq_set_wake = lpc32xx_irq_wake
};

static void lpc32xx_sic1_handler(unsigned int irq, struct irq_desc *desc)
Expand Down

0 comments on commit 4667f26

Please sign in to comment.