From: Juergen Schindele <schindele@nentec.de>
To: Scott Wood <oss@buserror.net>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: [PATCH] Freescale mpc8315 interrupt chip
Date: Thu, 11 May 2017 14:34:19 +0200 [thread overview]
Message-ID: <3052456.ktpuaNmngy@sherry> (raw)
In-Reply-To: <1493931328.25397.35.camel@buserror.net>
Next try to submit two patches for Freescale mpc8315.
first one
-----------------------------------------------------------------------=
------------
powerpc/ipic: Configure "EDGE" capabilities for IRQ0 too (like IRQ1-7)
Signed-off-by: Jurgen Schindele <schindele@nentec.de>
The external IRQ0 has the same capabilities as the other IRQ1-7 and is
handeled by the same register IPIC_SEPNR. When this register for "ack"
is not setup in "ipic_info" you can not configure this IRQ for
IRQ_TYPE_EDGE_FALLING. This is probably due to the non-continued number=
of IRQ0 in the Freescale hwirq number mapping.
--- linux-4.11/arch/powerpc/sysdev/ipic.c.orig 2017-05-11 13:40:43.874=
801534=20
+0200
+++ linux-4.11/arch/powerpc/sysdev/ipic.c 2017-05-11 14:05:06.336=
610289=20
+0200
@@ -315,6 +315,7 @@ static struct ipic_info ipic_info[] =3D {
.prio_mask =3D 7,
},
[48] =3D {
+ .ack =3D IPIC_SEPNR,
.mask =3D IPIC_SEMSR,
.prio =3D IPIC_SMPRR_A,
.force =3D IPIC_SEFCR,
second one
-----------------------------------------------------------------------=
------------------
powerpc/ipic: Precise ERR printk when "ipic_set_irq_type" fails
Signed-off-by: Jurgen Schindele <schindele@nentec.de>
When you setup an interrupt of a certain type on this interrupt-control=
er
which is not supported on this hardware you will get an error log but y=
ou
dont know which interrupt was the cause.
With this patch you are able to localize the source of failure.
--- linux-4.11/arch/powerpc/sysdev/ipic.c.orig 2017-05-11 14:08:07.098=
824986=20
+0200
+++ linux-4.11/arch/powerpc/sysdev/ipic.c 2017-05-11 14:10:51.010=
934755=20
+0200
@@ -611,14 +611,14 @@ static int ipic_set_irq_type(struct irq_
/* ipic supports only low assertion and high-to-low change sens=
es
*/
if (!(flow_type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_EDGE_FALLING))=
) {
- printk(KERN_ERR "ipic: sense type 0x%x not supported\n"=
,
- flow_type);
+ printk(KERN_ERR "ipic: sense type 0x%x not supported on=
"
+ "interrupt %d\n", flow_type, src);
return -EINVAL;
}
/* ipic supports only edge mode on external interrupts */
if ((flow_type & IRQ_TYPE_EDGE_FALLING) && !ipic_info[src].ack)=
{
printk(KERN_ERR "ipic: edge sense not supported on inte=
rnal "
- "interrupts\n");
+ "interrupt %d\n", src);
return -EINVAL;
}
I hope i respected all patch requirements ;-)
Am Donnerstag, 4. Mai 2017, 15:55:28 schrieb Scott Wood:
> On Thu, 2017-05-04 at 17:06 +0200, Juergen Schindele wrote:
> > Am Dienstag, 2. Mai 2017, 22:29:34 schrieb Scott Wood:
> > > On Tue, 2017-05-02 at 14:43 +0200, Juergen Schindele wrote:
> > > > Dear Scott,
> > > > sorry for the delay but i am not very familiar with the formati=
ng.
> > > > I passed the patch trough checkpatch.pl and there was no more e=
rror.
> > > > pease find patch in attached file.
> > > > Thanks
> > >=20
> > > Documentation/process/submitting-patches.rst explains the way to =
format
> > > and
> > > submit kernel patches.
> > >=20
> > > Also, why the unrelated change to a print statement in
> > > ipic_set_irq_type()?
> > >=20
> > > -Scott
> >=20
> > The second diff is not completely unrelated because when i was
> > investigating=20
> > the problem i saw only a message "edge sense not supported" but you=
dont
> > know on which interrupt he is complaining about. So i added this to=
find
> > out=20
> > who the suspect is.
>=20
> That's fine but it's still fixing a different problem than "irq0 setu=
p" and
> should be a separate patch.
>=20
> > Corrected patch
>=20
> Again, please read Documentation/process/submitting-patches.rst. Pat=
ches
> should be inline, not attached. The subject line should be something=
like
> "powerpc/ipic: Configure "EDGE" capabilities for IRQ0 (like IRQ1-7)" =
and
> there should be more description in the body of the changelog.
>=20
> -Scott
Thanks for your hints
--=20
i. A.
J=FCrgen Schindele
Softwareentwicklung
PSI Nentec GmbH
Greschbachstra=DFe 12
76229 Karlsruhe
Deutschland
Telefon: +49 721 94249-51
Telefax: +49 721 94249-10
schindele@nentec.de
www.nentec.de
Gesch=E4ftsf=FChrung: Klaus Becker, Wolfgang Fischer
Sitz der Gesellschaft: Karlsruhe
Handelsregister: Amtsgericht Mannheim HRB 107658
Diese E-Mail enth=E4lt vertrauliche oder rechtlich gesch=FCtzte Informa=
tionen.=20
Wenn Sie nicht der vorgesehene Empf=E4nger sind, informieren Sie bitte =
sofort=20
den Absender und l=F6schen Sie diese E-Mail. Das unbefugte Kopieren die=
ser E-
Mail oder die unbefugte Weitergabe der enthaltenen Informationen ist ni=
cht=20
gestattet.
The information contained in this message is confidential or protected =
by law.=20
If you are not the intended recipient, please contact the sender and de=
lete=20
this message. Any unauthorised copying of this message or unauthorised=20=
distribution of the information contained herein is prohibited.
next prev parent reply other threads:[~2017-05-11 12:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-10 14:53 Freescale mpc8315 IRQ0 setup Juergen Schindele
2017-04-30 6:55 ` Scott Wood
2017-05-02 12:43 ` Juergen Schindele
2017-05-03 3:29 ` Scott Wood
2017-05-04 15:06 ` Juergen Schindele
2017-05-04 20:55 ` Scott Wood
2017-05-11 12:34 ` Juergen Schindele [this message]
2017-05-11 13:38 ` [PATCH] Freescale mpc8315 interrupt chip Oliver O'Halloran
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=3052456.ktpuaNmngy@sherry \
--to=schindele@nentec.de \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=oss@buserror.net \
/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.