[PATCH] pinctrl/nomadik: allocate IRQ descriptors dynamically

Linus Walleij linus.walleij at linaro.org
Thu Sep 27 07:59:08 EDT 2012


On Thu, Sep 27, 2012 at 7:13 AM, Stephen Warren <swarren at nvidia.com> wrote:
> On 09/26/2012 11:18 AM, Linus Walleij wrote:

>> +     irq_start = NOMADIK_GPIO_TO_IRQ(pdata->first_gpio);
>
> Presumably that's a 1:1 mapping...

Yep, albeit on a legacy domain to be able to keep the start irq.

>> +     irq_base = irq_alloc_descs(irq_start, 0, NMK_GPIO_PER_CHIP,
>> +                                numa_node_id());
>> +     if (IS_ERR_VALUE(irq_base)) {
>> +             WARN(1, "Cannot allocate irq_descs @ IRQ%d, assuming pre-allocated\n",
>> +                  irq_start);
>> +             irq_base = irq_start;
>> +     }
>
> Hmmm. Is this code targetting the DT case or the non-DT case or both? I
> think typically you'd call irq_domain_add_linear without forcing a
> particular IRQ base for the DT case, and only call irq_alloc_descs() for
> the non-DT case, right?

This is indeed the non-DT case. The irqdomain stuff here doesn't seem
to be properly addressing the DT usecase. I'll cook a v2 version doing
a linear domain for DT and have Lee review it.

Thanks!
Linus Walleij



More information about the linux-arm-kernel mailing list