Re: [PATCH] pinctrl/nomadik: allocate IRQ descriptors dynamically

From: Linus Walleij
Date: Thu Sep 27 2012 - 07:59:06 EST


On Thu, Sep 27, 2012 at 7:13 AM, Stephen Warren <swarren@xxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/