All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>,
	monstr@monstr.eu, ralf@linux-mips.org, tglx@linutronix.de,
	jason@lakedaemon.net
Cc: soren.brinkmann@xilinx.com, linux-kernel@vger.kernel.org,
	linux-mips@linux-mips.org, michal.simek@xilinx.com,
	netdev@vger.kernel.org
Subject: Re: [Patch v4 04/12] irqchip: axi-intc: Add support for parent intc
Date: Thu, 1 Sep 2016 18:17:58 +0100	[thread overview]
Message-ID: <57C862C6.7070703@arm.com> (raw)
In-Reply-To: <1472748665-47774-5-git-send-email-Zubair.Kakakhel@imgtec.com>

On 01/09/16 17:50, Zubair Lutfullah Kakakhel wrote:
> The MIPS based xilfpga platform has the following IRQ structure
> 
> Peripherals --> xilinx_intcontroller -> mips_cpu_int controller
> 
> Add support for the driver to chain the irq handler
> 
> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
> 
> ---
> V3 -> V4
> Clean up if/else when a parent is found
> Pass irqchip structure to handler as data
> 
> V2 -> V3
> Reused existing parent node instead of finding again.
> Cleanup up handler based on review
> 
> V1 -> V2
> 
> No change
> ---
>  drivers/irqchip/irq-axi-intc.c | 25 +++++++++++++++++++++++--
>  1 file changed, 23 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/irqchip/irq-axi-intc.c b/drivers/irqchip/irq-axi-intc.c
> index ac31548..683b1f7 100644
> --- a/drivers/irqchip/irq-axi-intc.c
> +++ b/drivers/irqchip/irq-axi-intc.c
> @@ -15,6 +15,7 @@
>  #include <linux/of_address.h>
>  #include <linux/io.h>
>  #include <linux/bug.h>
> +#include <linux/of_irq.h>
>  
>  /* No one else should require these constants, so define them locally here. */
>  #define ISR 0x00			/* Interrupt Status Register */
> @@ -154,11 +155,23 @@ static const struct irq_domain_ops xintc_irq_domain_ops = {
>  	.map = xintc_map,
>  };
>  
> +static void xil_intc_irq_handler(struct irq_desc *desc)
> +{
> +	u32 pending;
> +
> +	do {
> +		pending = xintc_get_irq();
> +		if (pending == -1U)
> +			break;
> +		generic_handle_irq(pending);
> +	} while (true);
> +}
> +
>  static int __init xilinx_intc_of_init(struct device_node *intc,
>  					     struct device_node *parent)
>  {
>  	u32 nr_irq;
> -	int ret;
> +	int ret, irq;
>  	struct xintc_irq_chip *irqc;
>  
>  	irqc = kzalloc(sizeof(*irqc), GFP_KERNEL);
> @@ -217,7 +230,15 @@ static int __init xilinx_intc_of_init(struct device_node *intc,
>  	root_domain = irq_domain_add_linear(intc, nr_irq, &xintc_irq_domain_ops,
>  					    irqc);
>  
> -	irq_set_default_host(root_domain);
> +	if (parent) {
> +		irq = irq_of_parse_and_map(intc, 0);
> +		if (irq)
> +			irq_set_chained_handler_and_data(irq,
> +							 xil_intc_irq_handler,
> +							 irqc);
> +
> +	} else
> +		irq_set_default_host(root_domain);

Coding style, please.

Thanks,

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

  reply	other threads:[~2016-09-01 17:18 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-01 16:50 [Patch v4 00/12] microblaze/MIPS: xilfpga: intc and peripheral Zubair Lutfullah Kakakhel
2016-09-01 16:50 ` Zubair Lutfullah Kakakhel
2016-09-01 16:50 ` [Patch v4 01/12] microblaze: irqchip: Move intc driver to irqchip Zubair Lutfullah Kakakhel
2016-09-01 16:50   ` Zubair Lutfullah Kakakhel
2016-09-02  5:56   ` Michal Simek
2016-09-02  5:56     ` Michal Simek
2016-09-02  9:55     ` Zubair Lutfullah Kakakhel
2016-09-02  9:55       ` Zubair Lutfullah Kakakhel
2016-09-02  6:25   ` Michal Simek
2016-09-02  6:25     ` Michal Simek
2016-09-02 10:06     ` Zubair Lutfullah Kakakhel
2016-09-02 10:06       ` Zubair Lutfullah Kakakhel
2016-09-02 10:27       ` Michal Simek
2016-09-02 10:27         ` Michal Simek
2016-09-02 11:46         ` Zubair Lutfullah Kakakhel
2016-09-02 11:46           ` Zubair Lutfullah Kakakhel
2016-09-02 12:06           ` Michal Simek
2016-09-02 12:06             ` Michal Simek
2016-09-02 12:48             ` Jason Cooper
2016-09-02 13:28         ` Jason Cooper
2016-09-02 13:31       ` Marc Zyngier
2016-09-01 16:50 ` [Patch v4 02/12] irqchip: axi-intc: Clean up irqdomain argument and read/write Zubair Lutfullah Kakakhel
2016-09-01 16:50   ` Zubair Lutfullah Kakakhel
2016-09-01 17:15   ` Marc Zyngier
2016-09-02 10:47     ` Zubair Lutfullah Kakakhel
2016-09-02 10:47       ` Zubair Lutfullah Kakakhel
2016-09-02  1:25   ` kbuild test robot
2016-09-02  1:25     ` kbuild test robot
2016-09-01 16:50 ` [Patch v4 03/12] irqchip: axi-intc: Rename get_irq to xintc_get_irq Zubair Lutfullah Kakakhel
2016-09-01 16:50   ` Zubair Lutfullah Kakakhel
2016-09-02  5:58   ` Michal Simek
2016-09-02  5:58     ` Michal Simek
2016-09-01 16:50 ` [Patch v4 04/12] irqchip: axi-intc: Add support for parent intc Zubair Lutfullah Kakakhel
2016-09-01 16:50   ` Zubair Lutfullah Kakakhel
2016-09-01 17:17   ` Marc Zyngier [this message]
2016-09-01 16:50 ` [Patch v4 05/12] MIPS: xilfpga: Use irqchip_init instead of the legacy way Zubair Lutfullah Kakakhel
2016-09-01 16:50   ` Zubair Lutfullah Kakakhel
2016-09-01 16:50 ` [Patch v4 06/12] MIPS: xilfpga: Use Xilinx AXI Interrupt Controller Zubair Lutfullah Kakakhel
2016-09-01 16:50   ` Zubair Lutfullah Kakakhel
2016-09-02  7:05   ` Michal Simek
2016-09-02  7:05     ` Michal Simek
2016-09-02  7:06     ` Michal Simek
2016-09-02  7:06       ` Michal Simek
2016-09-01 16:51 ` [Patch v4 07/12] MIPS: xilfpga: Update DT node and specify uart irq Zubair Lutfullah Kakakhel
2016-09-01 16:51   ` Zubair Lutfullah Kakakhel
2016-09-01 16:51 ` [Patch v4 08/12] MIPS: Xilfpga: Add DT node for AXI I2C Zubair Lutfullah Kakakhel
2016-09-01 16:51   ` Zubair Lutfullah Kakakhel
2016-09-01 16:51 ` [Patch v4 09/12] net: ethernet: xilinx: Generate random mac if none found Zubair Lutfullah Kakakhel
2016-09-01 16:51   ` Zubair Lutfullah Kakakhel
2016-09-02  7:08   ` Michal Simek
2016-09-02  7:08     ` Michal Simek
2016-09-01 16:51 ` [Patch v4 10/12] net: ethernet: xilinx: Enable emaclite for MIPS Zubair Lutfullah Kakakhel
2016-09-01 16:51   ` Zubair Lutfullah Kakakhel
2016-09-01 16:51 ` [Patch v4 11/12] MIPS: xilfpga: Add DT node for AXI emaclite Zubair Lutfullah Kakakhel
2016-09-01 16:51   ` Zubair Lutfullah Kakakhel
2016-09-01 16:51 ` [Patch v4 12/12] MIPS: xilfpga: Update defconfig Zubair Lutfullah Kakakhel
2016-09-01 16:51   ` Zubair Lutfullah Kakakhel

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=57C862C6.7070703@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=Zubair.Kakakhel@imgtec.com \
    --cc=jason@lakedaemon.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=michal.simek@xilinx.com \
    --cc=monstr@monstr.eu \
    --cc=netdev@vger.kernel.org \
    --cc=ralf@linux-mips.org \
    --cc=soren.brinkmann@xilinx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.