From: jgunthorpe@obsidianresearch.com (Jason Gunthorpe)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: Orion: Hoist bridge interrupt handling out of the timer
Date: Sat, 8 Dec 2012 19:57:48 -0700 [thread overview]
Message-ID: <20121209025748.GA10405@obsidianresearch.com> (raw)
In-Reply-To: <20121208112624.GD25315@lunn.ch>
On Sat, Dec 08, 2012 at 12:26:24PM +0100, Andrew Lunn wrote:
> 1) It should have an IRQ domain, like the other IRQ chips we have.
> 2) It should have a DT binding, like the other IRQ chips we have.
I was going to look at a DT binding for this as a follow on, since
I'll want to bind to these interrupts.
Are you OK with keeping this patch as is and seeing DT in a follow up,
or as a series? It is already pretty big.
> 4) We than pass the watchdog interrupt via DT.
Right now the watchdog driver is coded to cause a board reset, so it
doesn't use interrupts at all. Adding interrupt support to watchdog
seems orthogonal to this?
What would it look like? For my boards I want the watchdog to panic(),
because I have another watchdog that takes care of reset, but that
won't be universal.
> We plan to remove old style platforms in the next few cycles, so its
Yay :)
> 3) We then pass the timer interrupt via DT to the timer driver.
> 3) is not so simple, because we currently don't have a timer binding
> for Orion SoC. However, with this cleanup, we are much closer to being
> able to use the 370/XP timer code.
Interesting.. The 370/XP is a more advanced version of the same timer
IP, there are several registers that driver is touching that are not
HW supported, at least on kirkwood.
It would be straightforward to add a binding in the style of
time-armada-370-xp.c, I can probably send that as a third patch.
The two DT bindings are straightforward, and my testing on Kirkwood
should cover alot - but it would be great if non-kirkwood boards could
review/test with this patch..
Do you expect a DT conversion for all orion_time_init users, or just
the one I can test or ..?
> > @@ -534,8 +535,9 @@ static void __init kirkwood_timer_init(void)
> > {
> > kirkwood_tclk = kirkwood_find_tclk();
> >
> > - orion_time_init(BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR,
> > - IRQ_KIRKWOOD_BRIDGE, kirkwood_tclk);
> > + orion_bridge_irq_init(IRQ_KIRKWOOD_BRIDGE, IRQ_KIRKWOOD_BRIDGE_START,
> > + BRIDGE_CAUSE);
> > + orion_time_init(IRQ_KIRKWOOD_BRIDGE_TIMER1, kirkwood_tclk);
> > }
>
> I think it would be better to do this in kirkwood_init_irq(). Same for
> the other platforms.
Yes.. I left it like this because it is very easy to audit that it is
correct (ie called, and called at the correc time). When DT support is
added this will have to change again, so expecting that the next patch
will have to change things so orion_bridge_irq_init is not called for
the DT case, and the patch after so orion_time_init is not called for
the DT case, are you OK with this patch leaving it here?
> > + u32 cause;
> > + int i;
> > +
> > + cause = readl(gc->reg_base) & readl(gc->reg_base + 4);
>
> Could you add a #define for this 4. I guess its an interrupt enable
> mask? Could regs.mask be used?
I will add a define, regs.mask could be used, but since the value is
known and constant I left it as a constant as a micro-optimization.
> > + gc = irq_alloc_generic_chip("orion_irq_edge", 1, irq_start,
>
> Maybe the name orion_bridge would be better?
Sure
Thanks,
Jason
next prev parent reply other threads:[~2012-12-09 2:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-07 22:55 [PATCH] ARM: Orion: Hoist bridge interrupt handling out of the timer Jason Gunthorpe
2012-12-08 11:26 ` Andrew Lunn
2012-12-09 2:57 ` Jason Gunthorpe [this message]
2012-12-09 8:30 ` Andrew Lunn
2012-12-09 13:06 ` Sebastian Hesselbarth
2013-06-04 17:26 ` Jason Gunthorpe
2013-06-05 8:57 ` Sebastian Hesselbarth
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=20121209025748.GA10405@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).