All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Joakim Tjernlund <joakim.tjernlund@transmode.se>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: devicetree and IRQ7 mapping for T1042(mpic)
Date: Thu, 15 Oct 2015 02:14:32 -0500	[thread overview]
Message-ID: <1444893272.5185.243.camel@freescale.com> (raw)
In-Reply-To: <1444893103.28972.68.camel@transmode.se>

On Thu, 2015-10-15 at 07:11 +0000, Joakim Tjernlund wrote:
> On Wed, 2015-10-14 at 19:11 -0500, Scott Wood wrote:
> > On Wed, 2015-10-14 at 19:37 +0000, Joakim Tjernlund wrote:
> > > I am trying to figure out how to describe/map external IRQ7 in the 
> > > devicetree.
> > > 
> > > Basically either IRQ7 to be left alone by Linux(becase u-boot already 
> > > set 
> > > it up)
> > > or map IRQ7 to sie 0(MPIC_EILR7=0xf0) and prio=0xf(MPIC_EIVPR7=0x4f0000)
> > > 
> > > There is no need for SW handler because IRQ7 will be routed to the DDR 
> > > controller
> > > and case an automatic Self Refresh just before CPU reset.
> > > 
> > > I cannot figure out how to do this. Any ideas?
> > > 
> > > If not possible from devicetree, then can one do it from board code?
> > 
> > The device tree describes the hardware.  Priority is configuration, and 
> > thus 
> > doesn't belong there.  You can call mpic_irq_set_priority() from board 
> > code.
> 
> Right.
> 
> > 
> > Likewise, the fact that you want to route irq7 to sie0 is configuration, 
> > not 
> > hardware description.  At most, the device tree should describe is what 
> > is 
> > connected to each sie output.  There's no current Linux support for 
> > routing 
> > an interrupt to sie or anything other than "int".
> 
> That explains why I could not find any mpic function for that ..
> 
> I found mpic dev. trees property "protected-sources" which might do what I 
> want, just
> leave the the irq alone but I cannot figure out what value to write there.
> Could you give me any example how to calculate dev. tree irq number for 
> IRQ7?
> 
> The mpic.txt mentions "Interrupt Source Configuration Registers" but google 
> did
> not turn up anything useful for me.

The device tree number for external IRQ 7 is 7.  Another option is to use the 
pic-no-reset property.

-Scott

      reply	other threads:[~2015-10-15  7:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-14 19:37 devicetree and IRQ7 mapping for T1042(mpic) Joakim Tjernlund
2015-10-15  0:11 ` Scott Wood
2015-10-15  0:14   ` Scott Wood
2015-10-15  7:11   ` Joakim Tjernlund
2015-10-15  7:14     ` Scott Wood [this message]

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=1444893272.5185.243.camel@freescale.com \
    --to=scottwood@freescale.com \
    --cc=joakim.tjernlund@transmode.se \
    --cc=linuxppc-dev@lists.ozlabs.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 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.