Date:2011-06-03 01:46:26 (9 years 1 month ago)
Author:Lars C.
Commit:26c132bad2acbc6fa9f895feef2c4ec94dcdb5bd
Message:MIPS: JZ4740: GPIO: Simplify IRQ demuxer

We already know the base IRQ for a GPIO chip, so there is no need to recalculate
it in the demux handler.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Files: arch/mips/jz4740/gpio.c (1 diff)

Change Details

arch/mips/jz4740/gpio.c
301301{
302302    uint32_t flag;
303303    unsigned int gpio_irq;
304    unsigned int gpio_bank;
305304    struct jz_gpio_chip *chip = irq_desc_get_handler_data(desc);
306305
307    gpio_bank = JZ4740_IRQ_GPIO0 - irq;
308
309306    flag = readl(chip->base + JZ_REG_GPIO_FLAG);
310
311307    if (!flag)
312308        return;
313309
314    gpio_irq = __fls(flag);
310    gpio_irq = chip->irq_base + __fls(flag);
315311
316312    jz_gpio_check_trigger_both(chip, irq);
317313
318    gpio_irq += (gpio_bank << 5) + JZ4740_IRQ_GPIO(0);
319
320314    generic_handle_irq(gpio_irq);
321315};
322316

Archive Download the corresponding diff file



interactive