linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: zonque@gmail.com (Daniel Mack)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 4/7] ARM: pxa: add devicetree code for irq handling
Date: Sun, 29 Jul 2012 22:40:28 +0200	[thread overview]
Message-ID: <50159FBC.2010409@gmail.com> (raw)
In-Reply-To: <201207291409.56645.arnd@arndb.de>

On 29.07.2012 16:09, Arnd Bergmann wrote:
> On Saturday 28 July 2012, Haojian Zhuang wrote:
>> On Sat, Jul 28, 2012 at 5:56 PM, Daniel Mack <zonque@gmail.com> wrote:
>>>> Since we have DT support at here. Could we use property for interrupt priority?
>>>
>>> Not sure what you mean here. Can you elaborate? I couldn't find any
>>> reference to IRQ priorities in other platforms either.
>>>
>>> Maybe we can also add that in a separate patch, which would also help in
>>> tracking possible regressions du to such a change?
>>>
>> cpu_has_ipr() returns true if CPU isn't PXA25x.
>> My point is that we can avoid to use cpu_is_xxx() while DT is used. We only need
>> to append a property "marvell,intc-priority" is DTS. So the code could
>> be changed
>> in below.
>> if (of_find_property(np, "marvell,intc-priority", NULL))
>>            __raw_writel(i | IPR_VALID, IRQ_BASE + IPR(i));
> 
> I think we can do even better if we extend the binding for this interrupt controller
> driver to have either #interrupt-cells=<1> or #interrupt-cells=<2>, depending on the
> chip that is being used. If the it is <1> (for pxa25x), then any driver would
> just use a bare interrupt number. If it's <2> (for all others), the driver would
> specify both the interrupt number and the priority, and we set up the register at
> the time when the interrupt gets enabled.
> 
> Do you think that would work?

Hmm, PXA25x (which does not feature IRQ priorities) shares a fair amount
of peripherals with other PXA series (which do have support for that). I
would much like to reflect that fact by inherhiting device nodes from
one dtsi to the other. Hence, if at all, we would need to have two cells
always, and just ignore the second argument on PXA25x.

And I also wonder whether using the second spec value for a priority
wouldn't be somehow abusive? Isn't that considered to denote the trigger
flags in contexts of interrupt controllers? At least, that is what
irq_domain_xlate_twocell() assumes.


Daniel

  reply	other threads:[~2012-07-29 20:40 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-26 19:16 [PATCH v2 0/7] Assorted PXA3xx DT patches Daniel Mack
2012-07-26 19:16 ` [PATCH v2 1/7] RTC: add DT bindings to pxa-rtc Daniel Mack
2012-07-26 19:16 ` [PATCH v2 2/7] MMC: pxa-mci: add DT bindings Daniel Mack
2012-07-26 19:16 ` [PATCH v2 3/7] MTD: pxa3xx-nand: add devicetree bindings Daniel Mack
2012-07-26 19:16 ` [PATCH v2 4/7] ARM: pxa: add devicetree code for irq handling Daniel Mack
2012-07-28  7:17   ` Haojian Zhuang
2012-07-28  9:56     ` Daniel Mack
2012-07-28 15:42       ` Haojian Zhuang
2012-07-29 14:09         ` Arnd Bergmann
2012-07-29 20:40           ` Daniel Mack [this message]
2012-07-30  8:31             ` Arnd Bergmann
2012-07-30  8:34               ` Daniel Mack
2012-07-30  8:55                 ` Haojian Zhuang
2012-07-30  9:31                   ` Daniel Mack
2012-07-31 12:18                     ` Arnd Bergmann
2012-07-29 15:08         ` Daniel Mack
2012-07-29 15:54           ` Haojian Zhuang
2012-07-29 19:01             ` Daniel Mack
2012-07-30  1:20               ` Haojian Zhuang
2012-07-30  1:24                 ` Haojian Zhuang
2012-07-30  7:11                   ` Daniel Mack
2012-07-29 16:13           ` Haojian Zhuang
2012-07-26 19:16 ` [PATCH v2 5/7] ARM: pxa3xx: skip default device initialization when booting via DT Daniel Mack
2012-07-26 19:16 ` [PATCH v2 6/7] ARM: pxa3xx: add generic DT machine code Daniel Mack
2012-07-26 19:16 ` [PATCH v2 7/7] ARM: pxa: add .dtsi files Daniel Mack

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=50159FBC.2010409@gmail.com \
    --to=zonque@gmail.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).