mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Thompson <daniel.thompson@linaro.org>
To: richard clark <richard.xnu.clark@gmail.com>
Cc: Marc Zyngier <maz@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, s32@nxp.com, leoyang.li@nxp.com,
	catalin-dan.udma@nxp.com, bogdan.hamciuc@nxp.com,
	bogdan.folea@nxp.com, ciprianmarian.costea@nxp.com,
	radu-nicolae.pirea@nxp.com, ghennadi.procopciuc@nxp.com
Subject: Re: Question about SPIs' interrupt trigger type restrictions
Date: Tue, 7 Jun 2022 09:47:48 +0100	[thread overview]
Message-ID: <20220607084748.45bc7qzxjjinb7mm@maple.lan> (raw)
In-Reply-To: <CAJNi4rPKbkqws6FvB66SaOR82LVHJo3F9DA6Q8SX4D2waiaieg@mail.gmail.com>

On Tue, Jun 07, 2022 at 09:29:06AM +0800, richard clark wrote:
> On Mon, Jun 6, 2022 at 6:08 PM Daniel Thompson
> <daniel.thompson@linaro.org> wrote:
> > There is a secondary interrupt
> > controller between the SoC pin and the GIC which inverts the logic (and
> > also obviates any need to deploy the GIC's edge detection features at
> > all... IMHO the GIC trigger mode should be active high).
>
> I don't think there's a interrupt controller between SOC WKPU and GIC,
> all the WKPU interrupt related does is to *detect* the external
> signal(falling/rising) and route to the GIC

See below.


> > Instead, I think the reason your code is weird is because the irqchip
> > driver for the WKPU is missing or broken. A secondary interrupt
> > controller requires an irqchip driver or you will end up with pieces of
> > the interrupt controller management code (e.g. weird pokes to the WKPU
> > to acknowledge things) appearing in all manner of inappropriate places.
>
> Again, no so-called second irq-chip except the GIC within the SOC.

Yes there is.

The WKPU is an interrupt controller and it sits between the SoC pin and
the GIC. To avoid weird code then you need a WKPU driver. Drivers for
interrupt controllers normally belong in drivers/irqchip.

I believe, in your case, this driver is either missing or broken. This
belief is based on evidence that you provided. You code appears to
attach an ISR directly to a GIC SPI irqno: if an irqchip driver for
the WKPU was present and working then I think you would be unable to
do this (because it would be busy).


> For me, the most important thing is WHY the GIC only support the
> rising edge just as its document said.

I can't help you with that. Sure, it might be interesting to know more
but I'm a pragmatist: I simply not that invested in revisiting a fifteen
year old design decision that can no longer be changed.


Daniel.

      reply	other threads:[~2022-06-07  8:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-25 10:01 richard clark
2022-05-25 19:14 ` Robin Murphy
2022-05-26  3:44   ` richard clark
2022-05-26  6:54     ` Marc Zyngier
2022-05-26  8:40       ` Robin Murphy
2022-05-26 12:30         ` richard clark
2022-05-26 13:00           ` Marc Zyngier
2022-05-26 12:09       ` richard clark
2022-05-26 12:52         ` Marc Zyngier
2022-05-30  8:40         ` Daniel Thompson
2022-06-05 12:03           ` richard clark
2022-06-06 10:08             ` Daniel Thompson
2022-06-07  1:29               ` richard clark
2022-06-07  8:47                 ` Daniel Thompson [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=20220607084748.45bc7qzxjjinb7mm@maple.lan \
    --to=daniel.thompson@linaro.org \
    --cc=bogdan.folea@nxp.com \
    --cc=bogdan.hamciuc@nxp.com \
    --cc=catalin-dan.udma@nxp.com \
    --cc=ciprianmarian.costea@nxp.com \
    --cc=ghennadi.procopciuc@nxp.com \
    --cc=leoyang.li@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=radu-nicolae.pirea@nxp.com \
    --cc=richard.xnu.clark@gmail.com \
    --cc=robin.murphy@arm.com \
    --cc=s32@nxp.com \
    /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

all inboxes | Powered by JetHome®