From: Alexander Stein <alexander.stein@systec-electronic.com>
To: Marc Zyngier <marc.zyngier@arm.com>
Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk>,
LKML <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Shawn Guo <shawnguo@kernel.org>
Subject: Re: polarity inversion on LS1021a
Date: Mon, 04 Dec 2017 17:04:44 +0100 [thread overview]
Message-ID: <6588111.hDmIEKzSZ3@ws-stein> (raw)
In-Reply-To: <4f27f4e1-f42c-e931-a31b-067bb62eed77@arm.com>
On Monday, December 4, 2017, 4:37:20 PM CET Marc Zyngier wrote:
> On 04/12/17 15:31, Alexander Stein wrote:
> > On Monday, December 4, 2017, 4:11:06 PM CET Rasmus Villemoes wrote:
> >> The LS1021A has a standard GIC-400, but allows inverting the polarity of
> >> six external interrupt lines via a certain register, effectively
> >> supporting IRQ_TYPE_LEVEL_LOW and IRQ_TYPE_EDGE_FALLING for those.
> >>
> >> I'm trying to figure out how one would add support for this. The patch
> >> below works but is obviously just meant to help show what I mean, so
> >> please don't comment on all the things that are wrong with it.
> >>
> >> It feels wrong to create a whole new irqchip driver copy-pasting the
> >> entire irg-gic.c, but I can't figure out how and where one could hook
> >> into the existing one. Any pointers on how to do this properly will be
> >> greatly appreciated.
> >
> > In my opinion a new irqchip is still required, but solely for modifying
> > SCFG_INTPCR depending on IRQ_TYPE_*
> > You would need to insert it as a cascading interrupt chip in device tree.
> > You also need to protect accesses to this register using a spinlock.
> > This is at least my idea how I would have done it, though never got time
> > for it.
> Almost. See my earlier reply. You just need a very minimal driver that
> only takes care of the polarity thing. Nobody needs to see yet another
> GIC driver...
Ah, maybe I should have made that more clear. Of course only a rather simple
driver for that single register is needed. The driver needs to handle the
infamous big-little-endian mismatch in ls1021a.
Best regards,
Alexander
prev parent reply other threads:[~2017-12-04 16:04 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-04 15:11 polarity inversion on LS1021a Rasmus Villemoes
2017-12-04 15:23 ` Marc Zyngier
2017-12-08 14:33 ` [RFC] irqchip: add support for LS1021A external interrupt lines Rasmus Villemoes
2017-12-08 15:11 ` Alexander Stein
2017-12-08 16:09 ` Marc Zyngier
2017-12-11 9:08 ` Rasmus Villemoes
2017-12-11 9:45 ` Alexander Stein
2017-12-11 10:02 ` Alexander Stein
2017-12-11 13:45 ` Rasmus Villemoes
2017-12-11 14:06 ` Rasmus Villemoes
2017-12-11 14:38 ` Alexander Stein
2017-12-08 16:02 ` Marc Zyngier
2017-12-11 9:30 ` Rasmus Villemoes
2017-12-11 18:29 ` Marc Zyngier
2017-12-12 23:28 ` Rob Herring
2017-12-15 22:55 ` Rasmus Villemoes
2017-12-21 22:45 ` Rob Herring
2017-12-20 8:30 ` [PATCH v2 1/2] irqchip: add support for Layerscape " Rasmus Villemoes
2017-12-20 8:30 ` [PATCH v2 2/2] dt/bindings: Add bindings for Layerscape external irqs Rasmus Villemoes
2017-12-21 22:44 ` Rob Herring
2018-01-22 9:21 ` [PATCH v3 1/2] irqchip: add support for Layerscape external interrupt lines Rasmus Villemoes
2018-01-22 9:21 ` [PATCH v3 2/2] dt/bindings: Add bindings for Layerscape external irqs Rasmus Villemoes
2018-01-24 15:28 ` Marc Zyngier
2018-01-25 15:02 ` [PATCH v4 1/2] irqchip: add support for Layerscape external interrupt lines Rasmus Villemoes
2018-01-25 15:02 ` [PATCH v4 2/2] dt/bindings: Add bindings for Layerscape external irqs Rasmus Villemoes
2018-02-05 6:07 ` Rob Herring
2018-02-08 15:08 ` Rasmus Villemoes
2018-02-09 9:47 ` Marc Zyngier
2018-02-23 21:08 ` [PATCH v5 0/2] irqchip: add support for Layerscape external interrupt lines Rasmus Villemoes
2018-02-23 21:08 ` [PATCH v5 1/2] " Rasmus Villemoes
2018-03-01 12:16 ` Thomas Gleixner
2018-05-04 7:44 ` Rasmus Villemoes
2019-09-17 9:39 ` Kurt Kanzenbach
2018-02-23 21:09 ` [PATCH v5 2/2] dt/bindings: Add bindings for Layerscape external irqs Rasmus Villemoes
2018-03-02 19:49 ` Rob Herring
2018-05-04 8:07 ` Rasmus Villemoes
2017-12-04 15:31 ` polarity inversion on LS1021a Alexander Stein
2017-12-04 15:37 ` Marc Zyngier
2017-12-04 16:04 ` Alexander Stein [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=6588111.hDmIEKzSZ3@ws-stein \
--to=alexander.stein@systec-electronic.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=rasmus.villemoes@prevas.dk \
--cc=shawnguo@kernel.org \
--cc=tglx@linutronix.de \
/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