From: jgunthorpe@obsidianresearch.com (Jason Gunthorpe)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] ARM: Orion: Bind the orion bridge interrupt controller through DT
Date: Tue, 11 Dec 2012 11:55:35 -0700 [thread overview]
Message-ID: <20121211185535.GA14534@obsidianresearch.com> (raw)
In-Reply-To: <20121211071333.GR17242@lunn.ch>
On Tue, Dec 11, 2012 at 08:13:33AM +0100, Andrew Lunn wrote:
> On Mon, Dec 10, 2012 at 11:58:13PM -0700, Jason Gunthorpe wrote:
> > > > + bridge_irq = irq_of_parse_and_map(np, 0);
> > > > + /* FIXME: irq_of_parse_and_map returns 0 on error, but on Dove the
> > > > + * bridge IRQ is 0.
> > > > + if (!bridge_irq)
> > > > + return -ENODEV;*/
> > > > +
> > > > + return orion_bridge_irq_init(bridge_irq, -1, base, np);
> > >
> > > So does this mean for Dove it will currently always fail?
> >
> > I guess that is hard to read without syntax hi-lighting, the 'if' is
> > also commented out.
> >
> > I was hopefull it would work as is, but looking deeper at
> > irq_of_parse_and_map and its call tree makes me doubtfull now..
> >
> > Fixing irq_of_parse_and_map is way to big a job for me :(
>
> Hi Jason
>
> https://lwn.net/Articles/470820/
>
> I don't think its fixable.
Oh right. That.
Looking at this some more, I think it should work, but not for very
good reasons.. irq_of_parse_and_map will return 0 on dove. It returns
0 because it is going through its error paths because it saw a 0 deep
inside, but it still returns 0.
orion_bridge_irq_init will work with 0 as a bridge_irq, we know this
because the timer code was using those code paths for a long time
> We need to see how other machine remap 0 to some other value and
> implement that for Dove.
It looks like it is straightforward to adjust Dove's
get_irqnr_and_base to add 1 to all the interrupt numbers, adjust
irqs.h to add 1, and adjust the irq setup. There would be no
performance penalty to doing this, but testing would be need to be
sure 100% of changes were made. If the above works it would be better
to do that sort of change after, or maybe after the non-DT code is
purged...
Kirkwood is already OK WRT the 0 IRQ, it is handled internally to
get_irqnr_and_base.
So, I will suggest to please test on dove as-is...
Did the other patches look OK?
I threw together an interrupt panic patch for the wdt, and that works
OK as well, so the kirkwood configuration is tested with this
series.
116: 4995890 orion_bridge orion_tick
117: 0 orion_bridge orion_wdt
Thanks,
Jason
next prev parent reply other threads:[~2012-12-11 18:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-11 1:18 [PATCHv2 1/3] ARM: Orion: Hoist bridge interrupt handling out of the timer Jason Gunthorpe
2012-12-11 1:18 ` [PATCH 2/3] ARM: Orion: Bind the orion bridge interrupt controller through DT Jason Gunthorpe
2012-12-11 6:24 ` Andrew Lunn
2012-12-11 6:58 ` Jason Gunthorpe
2012-12-11 7:13 ` Andrew Lunn
2012-12-11 18:55 ` Jason Gunthorpe [this message]
2013-01-10 1:47 ` Jason Cooper
2013-01-10 6:07 ` Andrew Lunn
2013-01-10 9:54 ` Sebastian Hesselbarth
2013-01-10 18:48 ` Jason Gunthorpe
2013-01-10 18:57 ` Jason Cooper
2013-01-11 4:02 ` Jason Gunthorpe
2013-01-11 8:13 ` Thomas Petazzoni
2013-01-11 11:59 ` Jason Cooper
2012-12-11 1:18 ` [PATCH 3/3] ARM: Orion: Bind the orion timer " Jason Gunthorpe
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=20121211185535.GA14534@obsidianresearch.com \
--to=jgunthorpe@obsidianresearch.com \
--cc=linux-arm-kernel@lists.infradead.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).