From: Jamie Iles <jamie-wmLquQDDieKakBO8gow8eQ@public.gmane.org>
To: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH 0/2] Full DT IRQ support for versatile
Date: Fri, 13 Jan 2012 01:42:50 +0000 [thread overview]
Message-ID: <20120113014250.GD14007@page> (raw)
In-Reply-To: <CACxGe6v-gkW+pDP-2hTcf7WqeMBtx+H80Xymj7SqS8nqin9qUA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Thu, Jan 12, 2012 at 06:20:37PM -0700, Grant Likely wrote:
> On Thu, Jan 12, 2012 at 5:43 PM, Jamie Iles <jamie-wmLquQDDieKakBO8gow8eQ@public.gmane.org> wrote:
> > These patches move versatile over to instantiating both interrupt
> > controllers from the device tree. I've tested this in qemu for both DT
> > and non-DT platforms but only with an initramfs. I've seen interrupts
> > generated on both controllers for both boot methods.
> >
> > Grant, Rob, this makes use of irqdomain again as I'm not sure what the
> > replacement is going to look like yet. versatile works with DT in
> > mainline, but that's kind of lucky... I know there's been patches to
> > make irq_domain_add_simple() return the irq_domain and can rebase if
> > needed.
>
> I posted the patches for finishing up irq_domain migration yesterday.
> irq_domain_add_simple() can trivially be changed to
> irq_domain_add_legacy. I'll try out these
> patches on top of my irqdomain/next branch
Excellent! I've just grabbed your branch and given it a spin. I fixed
up my patches with the patch below and had to revert "irqdesc:
Consolidate irq reservation logic" as I saw Rob mentioned as I was
getting negative irq_desc's allocated but otherwise it works nicely!
I've also tested your tree with the irqdesc patch reverted on picoxcell
and that's working nicely too!
Jamie
8<----
diff --git a/arch/arm/plat-versatile/fpga-irq.c b/arch/arm/plat-versatile/fpga-irq.c
index fd87b06..c4dac93 100644
--- a/arch/arm/plat-versatile/fpga-irq.c
+++ b/arch/arm/plat-versatile/fpga-irq.c
@@ -59,10 +59,9 @@ void __init fpga_irq_init(int parent_irq, u32 valid, struct fpga_irq_data *f)
f->chip.irq_ack = fpga_irq_mask;
f->chip.irq_mask = fpga_irq_mask;
f->chip.irq_unmask = fpga_irq_unmask;
- f->domain.irq_base = f->irq_start;
- f->domain.nr_irq = 32;
- f->domain.ops = &irq_domain_simple_ops;
- irq_domain_add(&f->domain);
+ if (!f->domain)
+ f->domain = irq_domain_add_legacy(NULL, 32, f->irq_start,
+ 0, &irq_domain_simple_ops);
if (parent_irq != -1) {
irq_set_handler_data(parent_irq, f);
@@ -103,7 +102,8 @@ int __init sic_of_init(struct device_node *np, struct device_node *parent)
err = sic_data->irq_start;
goto out_unmap;
}
- sic_data->domain.of_node = of_node_get(np);
+ sic_data->domain = irq_domain_add_legacy(np, 32, sic_data->irq_start,
+ 0, &irq_domain_simple_ops);
fpga_irq_init(irq, ~0, sic_data);
diff --git a/arch/arm/plat-versatile/include/plat/fpga-irq.h b/arch/arm/plat-versatile/include/plat/fpga-irq.h
index a1391f3..5e300e9 100644
--- a/arch/arm/plat-versatile/include/plat/fpga-irq.h
+++ b/arch/arm/plat-versatile/include/plat/fpga-irq.h
@@ -1,15 +1,14 @@
#ifndef PLAT_FPGA_IRQ_H
#define PLAT_FPGA_IRQ_H
-#include <linux/irqdomain.h>
-
struct device_node;
+struct irq_domain;
struct fpga_irq_data {
void __iomem *base;
unsigned int irq_start;
struct irq_chip chip;
- struct irq_domain domain;
+ struct irq_domain *domain;
};
void fpga_irq_init(int, u32, struct fpga_irq_data *);
next prev parent reply other threads:[~2012-01-13 1:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-13 0:43 [PATCH 0/2] Full DT IRQ support for versatile Jamie Iles
[not found] ` <1326415441-17695-1-git-send-email-jamie-wmLquQDDieKakBO8gow8eQ@public.gmane.org>
2012-01-13 0:44 ` [PATCH 1/2] versatile: sic: add device tree bindings Jamie Iles
[not found] ` <1326415441-17695-2-git-send-email-jamie-wmLquQDDieKakBO8gow8eQ@public.gmane.org>
2012-01-13 2:29 ` Grant Likely
[not found] ` <20120113022932.GB25999-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2012-01-13 10:35 ` Jamie Iles
2012-01-13 21:00 ` Grant Likely
[not found] ` <20120113210041.GD22767-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2012-01-13 21:19 ` Russell King - ARM Linux
2012-01-13 10:48 ` Russell King - ARM Linux
[not found] ` <20120113104842.GS1068-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2012-01-13 10:58 ` Jamie Iles
2012-01-13 18:41 ` Grant Likely
[not found] ` <20120113184151.GC22767-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2012-01-13 19:04 ` Russell King - ARM Linux
2012-01-13 0:44 ` [PATCH 2/2] versatile: dt: register interrupt controllers from dt Jamie Iles
2012-01-13 1:20 ` [PATCH 0/2] Full DT IRQ support for versatile Grant Likely
[not found] ` <CACxGe6v-gkW+pDP-2hTcf7WqeMBtx+H80Xymj7SqS8nqin9qUA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-01-13 1:42 ` Jamie Iles [this message]
2012-01-13 2:31 ` Grant Likely
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=20120113014250.GD14007@page \
--to=jamie-wmlquqddiekakbo8gow8eq@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
/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;
as well as URLs for NNTP newsgroup(s).