[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150330085030.GQ457@x1>
Date: Mon, 30 Mar 2015 09:50:30 +0100
From: Lee Jones <lee.jones@...aro.org>
To: Holger Dengler <dengler@...utronix.de>
Cc: linux-kernel@...r.kernel.org, Peter Mahler <mahler@...ug.com>,
Juergen Bubeck <bubeck@...ug.com>,
Benedikt Spranger <b.spranger@...utronix.de>,
Samuel Ortiz <sameo@...ux.intel.com>
Subject: Re: [PATCH 06/11] mfd: flexcard: add DMA interrupt domain
On Wed, 25 Mar 2015, Holger Dengler wrote:
> From: Benedikt Spranger <b.spranger@...utronix.de>
>
> The Flexcard comprise an interrupt controller for the attached
> tinys, timer, a Flexray related trigger and a second one for DMA.
> Both controllers share a single IRQ line.
>
> Add an interrupt domain for the DMA Controller interrupts.
>
> Signed-off-by: Holger Dengler <dengler@...utronix.de>
> Signed-off-by: Benedikt Spranger <b.spranger@...utronix.de>
> cc: Samuel Ortiz <sameo@...ux.intel.com>
> cc: Lee Jones <lee.jones@...aro.org>
> ---
> drivers/mfd/flexcard/irq.c | 95 +++++++++++++++++++++++++++++++++++++++++---
> drivers/mfd/flexcard/irq.h | 11 +++++
> include/linux/mfd/flexcard.h | 23 +++++++++++
> 3 files changed, 124 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/mfd/flexcard/irq.c b/drivers/mfd/flexcard/irq.c
> index fefcb24..17e8b2c 100644
> --- a/drivers/mfd/flexcard/irq.c
> +++ b/drivers/mfd/flexcard/irq.c
> @@ -27,11 +27,13 @@
> static irqreturn_t flexcard_demux(int irq, void *data)
> {
> struct flexcard_device *priv = data;
> - u32 stat;
> + u32 stat, dma_stat;
> int i, cur;
>
> stat = readl(&priv->conf->irs);
> - if (!stat)
> + dma_stat = readl(&priv->conf->dma_irsr);
> +
> + if (!stat && !dma_stat)
> return IRQ_NONE;
>
> for (i = 0; i < NR_FLEXCARD_IRQ; i++) {
> @@ -41,6 +43,15 @@ static irqreturn_t flexcard_demux(int irq, void *data)
> generic_handle_irq(cur);
> }
> }
> +
> + for (i = 0; i < NR_FLEXCARD_DMA_IRQ; i++) {
> + if (dma_stat & flexcard_dma_irq_tab[i].status) {
> + cur = irq_find_mapping(priv->dma_domain, i);
> + if (cur)
> + generic_handle_irq(cur);
> + }
> + }
You might only want to do the top if (stat) and only the second if
(dma_stat).
[...]
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists