[PATCH 03/22] irqchip: add a driver for Cortina Gemini

Marc Zyngier marc.zyngier at arm.com
Mon Jan 23 01:39:54 PST 2017


Hi Linus,

On 22/01/17 12:16, Linus Walleij wrote:
> As a part of transitioning the Gemini platform to device tree we
> create this clean, device-tree-only irqchip driver.
> 
> Cc: Janos Laube <janos.dev at gmail.com>
> Cc: Paulius Zaleckas <paulius.zaleckas at gmail.com>
> Cc: Hans Ulli Kroll <ulli.kroll at googlemail.com>
> Cc: Florian Fainelli <f.fainelli at gmail.com>
> Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
> ---
> irqchip maintainers: please just apply this when you feel pleased
> with it. These portions are functionally orthogonal to the series,
> it is just in a series for context.
> ---

[...]

> +int __init gemini_of_init_irq(struct device_node *node,
> +			      struct device_node *parent)
> +{
> +	struct gemini_irq_data *g = &girq;
> +	unsigned int i;
> +
> +	/*
> +	 * Disable the idle handler by default since it is buggy
> +	 * For more info see arch/arm/mach-gemini/idle.c
> +	 */
> +	cpu_idle_poll_ctrl(true);
> +
> +	g->base = of_iomap(node, 0);
> +	WARN(!g->base, "unable to map gemini irq registers\n");
> +
> +	/* Disable all interrupts */
> +	writel(0, IRQ_MASK(g->base));
> +	writel(0, FIQ_MASK(g->base));
> +
> +	g->domain = irq_domain_add_simple(node, GEMINI_NUM_IRQS, 0,
> +					  &gemini_irqdomain_ops, g);
> +	/* Map all IRQs */
> +	for (i = 0; i < GEMINI_NUM_IRQS; i++)
> +		irq_create_mapping(g->domain, i);

Why is this needed? I can see it being useful while converting the
platform to DT, but as you seem to kill the old code altogether, this
can probably go.

> +
> +	set_handle_irq(gemini_irqchip_handle_irq);
> +
> +	return 0;
> +}
> +IRQCHIP_DECLARE(gemini, "cortina,gemini-interrupt-controller",
> +		gemini_of_init_irq);
> 

Otherwise, looks good to me.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...



More information about the linux-arm-kernel mailing list