1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-24 01:27:30 +02:00

[adm8668] simplify IRQ controller code

Signed-off-by: Florian Fainelli <florian@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34546 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
florian 2012-12-06 22:39:27 +00:00
parent ec09388d8d
commit 679ccdc3c3

View File

@ -52,33 +52,13 @@ void plat_irq_dispatch(void)
*/
static void enable_adm8668_irq(struct irq_data *d)
{
int irq = d->irq;
if ((irq < 0) || (irq > NR_IRQS))
return;
ADM8668_INTC_REG(IRQ_ENABLE_REG) = (1 << irq);
ADM8668_INTC_REG(IRQ_ENABLE_REG) = (1 << d->irq);
}
/*
* disable 8668 irq
*/
static void disable_adm8668_irq(struct irq_data *d)
{
int irq = d->irq;
if ((irq < 0) || (irq > NR_IRQS))
return;
ADM8668_INTC_REG(IRQ_DISABLE_REG) = (1 << irq);
}
static void ack_adm8668_irq(struct irq_data *d)
{
int irq = d->irq;
ADM8668_INTC_REG(IRQ_DISABLE_REG) = (1 << irq);
ADM8668_INTC_REG(IRQ_DISABLE_REG) = (1 << d->irq);
}
/*
@ -88,7 +68,7 @@ static void ack_adm8668_irq(struct irq_data *d)
static struct irq_chip adm8668_irq_type = {
.name = "adm8668",
.irq_ack = ack_adm8668_irq,
.irq_mask = disable_adm8668_irq,
.irq_mask = ack_adm8668_irq,
.irq_unmask = enable_adm8668_irq
};