mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Marc Zyngier <marc.zyngier@arm.com>,
	Jason Cooper <jason@lakedaemon.net>,
	linux-kernel@vger.kernel.org, linux-kernel-owner@vger.kernel.org
Subject: Re: [PATCH] irqchip: vic: Support cascaded VIC in device tree
Date: Wed, 19 Feb 2020 11:35:04 +0000	[thread overview]
Message-ID: <a2079c252f7c87753e957aa8a09c3824@kernel.org> (raw)
In-Reply-To: <20200213124757.35385-1-linus.walleij@linaro.org>

Hi Linus,

Please use my kernel.org email address, I just rescued this email
from the ML...

On 2020-02-13 12:47, Linus Walleij wrote:
> When transitioning some elder platforms to device tree it
> becomes necessary to cascade VIC IRQ chips off another
> interrupt controller.
> 
> Tested with the cascaded VIC on the Integrator/AP attached
> logic module IM-PD1.
> 
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  drivers/irqchip/irq-vic.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/irqchip/irq-vic.c b/drivers/irqchip/irq-vic.c
> index f3f20a3cff50..caff21b4bac6 100644
> --- a/drivers/irqchip/irq-vic.c
> +++ b/drivers/irqchip/irq-vic.c
> @@ -509,9 +509,7 @@ static int __init vic_of_init(struct device_node 
> *node,
>  	void __iomem *regs;
>  	u32 interrupt_mask = ~0;
>  	u32 wakeup_mask = ~0;
> -
> -	if (WARN(parent, "non-root VICs are not supported"))
> -		return -EINVAL;
> +	int parent_irq = 0;

nit: Do you need this to be initialized to zero?

> 
>  	regs = of_iomap(node, 0);
>  	if (WARN_ON(!regs))
> @@ -519,11 +517,14 @@ static int __init vic_of_init(struct device_node 
> *node,
> 
>  	of_property_read_u32(node, "valid-mask", &interrupt_mask);
>  	of_property_read_u32(node, "valid-wakeup-mask", &wakeup_mask);
> +	parent_irq = of_irq_get(node, 0);
> +	if (parent_irq < 0)
> +		parent_irq = 0;
> 
>  	/*
>  	 * Passing 0 as first IRQ makes the simple domain allocate 
> descriptors
>  	 */
> -	__vic_init(regs, 0, 0, interrupt_mask, wakeup_mask, node);
> +	__vic_init(regs, parent_irq, 0, interrupt_mask, wakeup_mask, node);
> 
>  	return 0;
>  }

Do you want this as a fix?

Thanks,

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

      reply	other threads:[~2020-02-19 11:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-13 12:47 Linus Walleij
2020-02-19 11:35 ` Marc Zyngier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a2079c252f7c87753e957aa8a09c3824@kernel.org \
    --to=maz@kernel.org \
    --cc=jason@lakedaemon.net \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel-owner@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome