From: Marc Zyngier <maz@kernel.org>
To: Bert Vermeulen <bert@biot.com>
Cc: "Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
"Rob Herring" <robh+dt@kernel.org>,
"Paul Burton" <paulburton@kernel.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Damien Le Moal" <damien.lemoal@wdc.com>,
"Mateusz Holenko" <mholenko@antmicro.com>,
"Stafford Horne" <shorne@gmail.com>,
"Pawel Czarnecki" <pczarnecki@internships.antmicro.com>,
"Palmer Dabbelt" <palmerdabbelt@google.com>,
"Cédric Le Goater" <clg@kaod.org>,
"Shawn Guo" <shawnguo@kernel.org>,
"Joel Stanley" <joel@jms.id.au>,
"Leonard Crestez" <leonard.crestez@nxp.com>,
"Peng Fan" <peng.fan@nxp.com>,
linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH v2] Add support for Realtek RTL838x/RTL839x switch SoCs
Date: Sun, 27 Dec 2020 11:33:06 +0000 [thread overview]
Message-ID: <87eejbpjpp.wl-maz@kernel.org> (raw)
In-Reply-To: <b8c989de-aae3-fa5e-90aa-ebce668c80f2@biot.com>
Bert,
On Sat, 26 Dec 2020 15:02:21 +0000,
Bert Vermeulen <bert@biot.com> wrote:
>
> On 12/23/20 5:18 PM, Marc Zyngier wrote:
> >> + /* Set up interrupt routing */
> >> + writel(RTL8380_IRR0_SETTING, REG(RTL8380_IRR0));
> >> + writel(RTL8380_IRR1_SETTING, REG(RTL8380_IRR1));
> >> + writel(RTL8380_IRR2_SETTING, REG(RTL8380_IRR2));
> >> + writel(RTL8380_IRR3_SETTING, REG(RTL8380_IRR3));
> >
> > What is this doing?
>
> It's fairly evident considering the comments -- routing of secondary
> IRQs onto the CPU IRQs.
The term "interrupt routing" is normally used when there is multiple
possible targets for a given interrupt, in general a SMP system. Given
that your toy SoC seems to be UP, using "interrupt routing" in this
context is anything *but* evident.
Moreover, since this "routing" is obviously SW controlled, how is that
going to work when the next system has a different mapping between
internal and external interrupts?
> But as to packing this into DTS I'm not sure.
>
> DTS syntax being what it is, this would inevitably get more complex
> and harder to understand. Do you have an example where this is done in
> a better way?
The DT syntax is a lot clearer than the seemingly random bunch of
writes above, and has the invaluable advantage of being decoupled from
the driver code. If, as I suspect, the same IP block has been
copy-pasted across multiple implementations with different interrupt
mappings, we'll end up with an explosion of board-specific files,
which is exactly the problem DT has been tasked to solve.
If the DT model is not suitable for your particular use case, please
explain what doesn't work, and people will be more than eager to help.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
prev parent reply other threads:[~2020-12-27 11:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20201223150648.1633113-1-bert@biot.com>
2020-12-23 16:18 ` [PATCH v2] Add support for Realtek RTL838x/RTL839x switch SoCs Marc Zyngier
2020-12-26 15:02 ` Bert Vermeulen
2020-12-27 11:33 ` Marc Zyngier [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=87eejbpjpp.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=bert@biot.com \
--cc=clg@kaod.org \
--cc=damien.lemoal@wdc.com \
--cc=devicetree@vger.kernel.org \
--cc=joel@jms.id.au \
--cc=leonard.crestez@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=mholenko@antmicro.com \
--cc=palmerdabbelt@google.com \
--cc=paulburton@kernel.org \
--cc=pczarnecki@internships.antmicro.com \
--cc=peng.fan@nxp.com \
--cc=robh+dt@kernel.org \
--cc=shawnguo@kernel.org \
--cc=shorne@gmail.com \
--cc=tglx@linutronix.de \
--cc=tsbogend@alpha.franken.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;
as well as URLs for NNTP newsgroup(s).