From: Mark Rutland <mark.rutland@arm.com>
To: Andrew Bresticker <abrestic@chromium.org>
Cc: James Hogan <james.hogan@imgtec.com>,
Ralf Baechle <ralf@linux-mips.org>,
Rob Herring <robh+dt@kernel.org>, Pawel Moll <Pawel.Moll@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
Thomas Gleixner <tglx@linutronix.de>,
Jason Cooper <jason@lakedaemon.net>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
John Crispin <blogic@openwrt.org>,
David Daney <ddaney.cavm@gmail.com>,
Qais Yousef <qais.yousef@imgtec.com>,
Linux-MIPS <linux-mips@linux-mips.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V3 2/4] of: Add binding document for MIPS GIC
Date: Wed, 29 Oct 2014 18:01:25 +0000 [thread overview]
Message-ID: <20141029180125.GD26471@leverpostej> (raw)
In-Reply-To: <CAL1qeaFeoKFbea7eiiXaw87PYUWO1JmP5xxdLLpW2RrFCprtZg@mail.gmail.com>
On Wed, Oct 29, 2014 at 04:55:56PM +0000, Andrew Bresticker wrote:
> Hi James,
>
> On Wed, Oct 29, 2014 at 2:21 AM, James Hogan <james.hogan@imgtec.com> wrote:
> > Hi Andrew,
> >
> > On 29/10/14 00:12, Andrew Bresticker wrote:
> >> - changed compatible string to include CPU version
> >
> >> +Required properties:
> >> +- compatible : Should be "mti,<cpu>-gic". Supported variants:
> >> + - "mti,interaptiv-gic"
> >
> >> +Required properties for timer sub-node:
> >> +- compatible : Should be "mti,<cpu>-gic-timer". Supported variants:
> >> + - "mti,interaptiv-gic-timer"
> >
> > Erm, I'm a bit confused...
> > Why do you include the core name in the compatible string?
> >
> > You seem to be suggesting that:
> >
> > 1) The GIC/timer drivers need to know what core they're running on.
> >
> > Is that really true?
>
> They don't now, but it's possible that a future CPU has a newer
> revision of the GIC which has some differences that need to be
> accounted for in the driver.
At that point you can allocate a new compatible string. Until then you
don't necessarily need to distinguish.
Is the timer defined by the architecture, or is it specific to this CPU
(and might get reused in future)?
> > 2) It isn't possible to probe the core type.
> >
> > But the kernel already knows this, so what's wrong with using
> > current_cpu_type() like everything else that needs to know?
> >
> > 3) Every new core should require a new compatible string to be added
> > before the GIC will work. You don't even have a generic compatible
> > string that DT can specify after the core specific one as a fallback.
>
> Yes, adding a generic compatible string would be a good idea.
>
> > Please lets not do this unless it's actually necessary (which AFAICT it
> > really isn't).
>
> The point of this was to future-proof these bindings and I though that
> CPU type was the best way to indicate version in the compatible
> string. This is also how it's done for the ARM GIC and arch timers.
> Perhaps the best thing to do is to require both a core-specific
> ("mti,interaptiv-gic") and generic ("mti,gic") compatible string and
> just match on the generic one for now until there's a need to use the
> core-specific one. Thoughts?
If this timer is architected you can have a generic string for now, with
each CPU having a more specific string just in case, e.g.
compatible = "mti,interaptiv-gic-timer", "mti,gic-timer".
The kernel driver can currently match just "mti,gic-timer", andd
everything should be fine if it turns out nothing changes with new CPUs:
compatible = "mti,newcpu-gic-timer", "mti,gic-timer";
If the new CPU's timer doesn't quite match, you add its comaptible
string to the driver, and drop "mti,gic-timer" from the node's
comaptible list:
compatible = "mti,newcpu-gic-timer";
Mark.
next prev parent reply other threads:[~2014-10-29 18:01 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-29 0:12 [PATCH V3 0/4] MIPS: GIC device-tree support Andrew Bresticker
2014-10-29 0:12 ` [PATCH V3 1/4] of: Add vendor prefix for MIPS Technologies, Inc Andrew Bresticker
2014-10-29 0:12 ` [PATCH V3 2/4] of: Add binding document for MIPS GIC Andrew Bresticker
2014-10-29 9:21 ` James Hogan
2014-10-29 16:55 ` Andrew Bresticker
2014-10-29 17:13 ` James Hogan
2014-10-29 17:25 ` Andrew Bresticker
2014-10-29 21:34 ` James Hogan
2014-10-29 18:01 ` Mark Rutland [this message]
2014-10-29 11:01 ` Qais Yousef
[not found] ` <5450C915.9030600-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
2014-10-29 16:56 ` Andrew Bresticker
[not found] ` <CAL1qeaGm1Ma=B-gJV2ovnLNYFooq6bv12rODq4d8cGtKLeNy-g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-10-29 17:05 ` Qais Yousef
2014-10-29 11:09 ` Qais Yousef
2014-10-29 17:08 ` Andrew Bresticker
[not found] ` <CAL1qeaHEE43n6V-y6XECicPaoEAfTBpyfg8bYJZK0e-pSMAJjw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-10-29 17:23 ` Qais Yousef
2014-10-29 17:46 ` Mark Rutland
2014-10-29 0:12 ` [PATCH V3 3/4] irqchip: mips-gic: Add device-tree support Andrew Bresticker
[not found] ` <1414541562-10076-1-git-send-email-abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2014-10-29 0:12 ` [PATCH V3 4/4] clocksource: " Andrew Bresticker
2014-10-29 17:51 ` Mark Rutland
2014-11-04 23:49 ` Andrew Bresticker
2014-10-29 8:09 ` [PATCH V3 0/4] MIPS: GIC " Arnd Bergmann
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=20141029180125.GD26471@leverpostej \
--to=mark.rutland@arm.com \
--cc=Pawel.Moll@arm.com \
--cc=abrestic@chromium.org \
--cc=blogic@openwrt.org \
--cc=daniel.lezcano@linaro.org \
--cc=ddaney.cavm@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=james.hogan@imgtec.com \
--cc=jason@lakedaemon.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=qais.yousef@imgtec.com \
--cc=ralf@linux-mips.org \
--cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).