From: "Peter Kümmel" <syntheticpp@gmx.net>
To: Felipe Balbi <balbi@ti.com>, Tony Lindgren <tony@atomide.com>,
Thomas Gleixner <tglx@linutronix.de>,
Jason Cooper <jason@lakedaemon.net>
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>,
Linux ARM Kernel Mailing List
<linux-arm-kernel@lists.infradead.org>,
Linux OMAP Mailing List <linux-omap@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Pavel Machek <pavel@ucw.cz>,
Santosh Shilimkar <ssantosh@kernel.org>
Subject: Re: [PATCH] irqchip: omap-intc: fix legacy DMA regression
Date: Wed, 07 Jan 2015 12:12:34 +0100 [thread overview]
Message-ID: <54AD14A2.1060006@gmx.net> (raw)
In-Reply-To: <1420563093-26026-1-git-send-email-balbi@ti.com>
Am 06.01.2015 um 17:51 schrieb Felipe Balbi:
> commit 55601c9f2467 (arm: omap: intc: switch over
> to linear irq domain) introduced a regression with
> SDMA legacy driver because that driver strictly depends
> on INTC's IRQs starting at NR_IRQs. Aparently
> irq_domain_add_linear() won't guarantee that, since we see
> a 7 IRQs difference when booting with and without the
> commit cited above.
>
> Until arch/arm/plat-omap/dma.c is properly fixed, we
> must maintain OMAP2/3 using irq_domain_add_legacy().
>
> A FIXME note was added so people know to delete that
> code once that legacy DMA driver is fixed up.
>
> Fixes: 55601c9f2467 (arm: omap: intc: switch over to linear irq domain)
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> ---
> drivers/irqchip/irq-omap-intc.c | 26 +++++++++++++++++++++-----
> 1 file changed, 21 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/irqchip/irq-omap-intc.c b/drivers/irqchip/irq-omap-intc.c
> index 3c970259c0eb..6ef88f56cf8d 100644
> --- a/drivers/irqchip/irq-omap-intc.c
> +++ b/drivers/irqchip/irq-omap-intc.c
> @@ -263,7 +263,7 @@ static int __init omap_init_irq_of(struct device_node *node)
> return ret;
> }
>
> -static int __init omap_init_irq_legacy(u32 base)
> +static int __init omap_init_irq_legacy(u32 base, struct device_node *node)
> {
> int j, irq_base;
>
> @@ -277,7 +277,7 @@ static int __init omap_init_irq_legacy(u32 base)
> irq_base = 0;
> }
>
> - domain = irq_domain_add_legacy(NULL, omap_nr_irqs, irq_base, 0,
> + domain = irq_domain_add_legacy(node, omap_nr_irqs, irq_base, 0,
> &irq_domain_simple_ops, NULL);
>
> omap_irq_soft_reset();
> @@ -301,10 +301,26 @@ static int __init omap_init_irq(u32 base, struct device_node *node)
> {
> int ret;
>
> - if (node)
> + /*
> + * FIXME legacy OMAP DMA driver sitting under arch/arm/plat-omap/dma.c
> + * depends is still not ready for linear IRQ domains; because of that
> + * we need to temporarily "blacklist" OMAP2 and OMAP3 devices from using
> + * linear IRQ Domain until that driver is finally fixed.
> + */
> + if (of_device_is_compatible(node, "ti,omap2-intc") ||
> + of_device_is_compatible(node, "ti,omap3-intc")) {
> + struct resource res;
> +
> + if (of_address_to_resource(node, 0, &res))
> + return -ENOMEM;
> +
> + base = res.start;
> + ret = omap_init_irq_legacy(base, node);
> + } else if (node) {
> ret = omap_init_irq_of(node);
> - else
> - ret = omap_init_irq_legacy(base);
> + } else {
> + ret = omap_init_irq_legacy(base, NULL);
> + }
>
> if (ret == 0)
> omap_irq_enable_protection();
>
Thanks, works on DM3730.
Peter
WARNING: multiple messages have this Message-ID (diff)
From: syntheticpp@gmx.net (Peter Kümmel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] irqchip: omap-intc: fix legacy DMA regression
Date: Wed, 07 Jan 2015 12:12:34 +0100 [thread overview]
Message-ID: <54AD14A2.1060006@gmx.net> (raw)
In-Reply-To: <1420563093-26026-1-git-send-email-balbi@ti.com>
Am 06.01.2015 um 17:51 schrieb Felipe Balbi:
> commit 55601c9f2467 (arm: omap: intc: switch over
> to linear irq domain) introduced a regression with
> SDMA legacy driver because that driver strictly depends
> on INTC's IRQs starting at NR_IRQs. Aparently
> irq_domain_add_linear() won't guarantee that, since we see
> a 7 IRQs difference when booting with and without the
> commit cited above.
>
> Until arch/arm/plat-omap/dma.c is properly fixed, we
> must maintain OMAP2/3 using irq_domain_add_legacy().
>
> A FIXME note was added so people know to delete that
> code once that legacy DMA driver is fixed up.
>
> Fixes: 55601c9f2467 (arm: omap: intc: switch over to linear irq domain)
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> ---
> drivers/irqchip/irq-omap-intc.c | 26 +++++++++++++++++++++-----
> 1 file changed, 21 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/irqchip/irq-omap-intc.c b/drivers/irqchip/irq-omap-intc.c
> index 3c970259c0eb..6ef88f56cf8d 100644
> --- a/drivers/irqchip/irq-omap-intc.c
> +++ b/drivers/irqchip/irq-omap-intc.c
> @@ -263,7 +263,7 @@ static int __init omap_init_irq_of(struct device_node *node)
> return ret;
> }
>
> -static int __init omap_init_irq_legacy(u32 base)
> +static int __init omap_init_irq_legacy(u32 base, struct device_node *node)
> {
> int j, irq_base;
>
> @@ -277,7 +277,7 @@ static int __init omap_init_irq_legacy(u32 base)
> irq_base = 0;
> }
>
> - domain = irq_domain_add_legacy(NULL, omap_nr_irqs, irq_base, 0,
> + domain = irq_domain_add_legacy(node, omap_nr_irqs, irq_base, 0,
> &irq_domain_simple_ops, NULL);
>
> omap_irq_soft_reset();
> @@ -301,10 +301,26 @@ static int __init omap_init_irq(u32 base, struct device_node *node)
> {
> int ret;
>
> - if (node)
> + /*
> + * FIXME legacy OMAP DMA driver sitting under arch/arm/plat-omap/dma.c
> + * depends is still not ready for linear IRQ domains; because of that
> + * we need to temporarily "blacklist" OMAP2 and OMAP3 devices from using
> + * linear IRQ Domain until that driver is finally fixed.
> + */
> + if (of_device_is_compatible(node, "ti,omap2-intc") ||
> + of_device_is_compatible(node, "ti,omap3-intc")) {
> + struct resource res;
> +
> + if (of_address_to_resource(node, 0, &res))
> + return -ENOMEM;
> +
> + base = res.start;
> + ret = omap_init_irq_legacy(base, node);
> + } else if (node) {
> ret = omap_init_irq_of(node);
> - else
> - ret = omap_init_irq_legacy(base);
> + } else {
> + ret = omap_init_irq_legacy(base, NULL);
> + }
>
> if (ret == 0)
> omap_irq_enable_protection();
>
Thanks, works on DM3730.
Peter
next prev parent reply other threads:[~2015-01-07 11:13 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-01 18:12 3.18.1->3.19-rc2: In-band Error seen by MPU Peter Kümmel
2015-01-01 18:20 ` Aaro Koskinen
2015-01-02 16:19 ` Tony Lindgren
2015-01-02 18:31 ` Peter Kümmel
2015-01-02 20:19 ` Aaro Koskinen
2015-01-02 20:40 ` Tony Lindgren
2015-01-02 22:34 ` Aaro Koskinen
2015-01-03 0:02 ` Tony Lindgren
2015-01-03 11:24 ` Peter Kümmel
2015-01-03 12:16 ` Aaro Koskinen
2015-01-05 15:43 ` Felipe Balbi
2015-01-05 23:16 ` Aaro Koskinen
2015-01-06 0:12 ` Tony Lindgren
2015-01-06 2:02 ` Felipe Balbi
2015-01-06 2:01 ` Felipe Balbi
2015-01-06 12:38 ` Aaro Koskinen
2015-01-06 16:51 ` [PATCH] irqchip: omap-intc: fix legacy DMA regression Felipe Balbi
2015-01-06 16:51 ` Felipe Balbi
2015-01-06 17:48 ` Aaro Koskinen
2015-01-06 17:48 ` Aaro Koskinen
2015-01-06 17:52 ` Tony Lindgren
2015-01-06 17:52 ` Tony Lindgren
2015-01-06 18:05 ` Russell King - ARM Linux
2015-01-06 18:05 ` Russell King - ARM Linux
2015-01-06 18:24 ` Aaro Koskinen
2015-01-06 18:24 ` Aaro Koskinen
2015-01-06 18:30 ` Tony Lindgren
2015-01-06 18:30 ` Tony Lindgren
2015-01-06 20:38 ` [PATCH v2] " Felipe Balbi
2015-01-06 20:38 ` Felipe Balbi
2015-01-07 3:00 ` Jason Cooper
2015-01-07 3:00 ` Jason Cooper
2015-01-19 18:34 ` Tony Lindgren
2015-01-19 18:34 ` Tony Lindgren
2015-01-07 11:12 ` Peter Kümmel [this message]
2015-01-07 11:12 ` [PATCH] " Peter Kümmel
2015-01-06 11:25 ` 3.18.1->3.19-rc2: In-band Error seen by MPU Peter Kümmel
2015-01-06 11:52 ` Sebastian Reichel
2015-01-06 12:47 ` Aaro Koskinen
2015-01-06 13:47 ` Peter Kümmel
2015-01-06 13:04 ` Peter Kümmel
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=54AD14A2.1060006@gmx.net \
--to=syntheticpp@gmx.net \
--cc=aaro.koskinen@iki.fi \
--cc=balbi@ti.com \
--cc=jason@lakedaemon.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=ssantosh@kernel.org \
--cc=tglx@linutronix.de \
--cc=tony@atomide.com \
/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.