From: Scott Wood <scottwood@freescale.com>
To: <Dongsheng.wang@freescale.com>
Cc: devicetree-discuss@lists.ozlabs.org, paulus@samba.org,
linuxppc-dev@lists.ozlabs.org, kumar.gala@freescale.com
Subject: Re: [PATCH v2 1/2] powerpc/mpic: Add Open-PIC global timer document
Date: Fri, 10 Aug 2012 14:21:45 -0500 [thread overview]
Message-ID: <50255F49.5050500@freescale.com> (raw)
In-Reply-To: <1344578002-8057-1-git-send-email-Dongsheng.wang@freescale.com>
On 08/10/2012 12:53 AM, Dongsheng.wang@freescale.com wrote:
> From: Wang Dongsheng <Dongsheng.Wang@freescale.com>
>
> Add a description of the OPEN-PIC global timer in the OPEN-PIC document.
>
> Moidfy mpic-timer document. 1.Add a TFRR register region. This register
> is written by software to report the clocking frequency of the PIC timers.
> 2.Add a device_type. The global timer in line with the OPEN-PIC specification.
>
> Signed-off-by: Wang Dongsheng <Dongsheng.Wang@freescale.com>
> Signed-off-by: Li Yang <leoli@freescale.com>
> ---
> Documentation/devicetree/bindings/open-pic.txt | 46 ++++++++++++++++++++
> .../devicetree/bindings/powerpc/fsl/mpic-timer.txt | 21 +++++----
> arch/powerpc/boot/dts/fsl/pq3-mpic-timer-B.dtsi | 7 ++-
> arch/powerpc/boot/dts/fsl/pq3-mpic.dtsi | 7 ++-
> 4 files changed, 66 insertions(+), 15 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/open-pic.txt b/Documentation/devicetree/bindings/open-pic.txt
> index 909a902..045c2e9 100644
> --- a/Documentation/devicetree/bindings/open-pic.txt
> +++ b/Documentation/devicetree/bindings/open-pic.txt
> @@ -92,6 +92,52 @@ Example 2:
>
> * References
>
> +* Open PIC global timers
> +
> +Required properties:
> +- compatible: "open-pic,global-timer"
open-pic isn't a vendor (or software project that acts like a
pseudo-vendor) -- I'd go with "open-pic-global-timer".
> +- reg : Contains two regions. The first is the timer frequency reporting
> + register for the group. The second is the main timer register bank
> + (GTCCR, GTBCR, GTVPR, GTDR).
Why not just put clock-frequency in the node, instead of describing
TFRR? I don't think U-Boot currently sets TFRR.
> +- available-ranges: use <start count> style section to define which
> + timer interrupts can be used. This property is optional; without this,
> + all timers within the group can be used.
> +
> +- interrupts: one interrupt per timer in the group, in order, starting
> + with timer zero. If available-ranges is present, only the interrupts
> + that correspond to available timers shall be present.
> +
> +* Examples
> +
> +Example 1:
> +
> + /* Note that this requires #interrupt-cells to be 4 */
> + timer: timer@010f0 {
Unit addres shouldn't have leading zeroes.
> + compatible = "open-pic,global-timer";
> + device_type = "open-pic";
Remove device_type. Not only is it deprecated outside of real OF, it's
wrong -- this isn't an openpic, it's just a subset of it.
> + reg = <0x010f0 4 0x01100 0x100>;
> +
> + /* Another AMP partition is using timer */
> + available-ranges = <2 2>;
>
> +
> + interrupts = <2 0 3 0
> + 3 0 3 0>;
> + };
> +
> +Example 2:
> +
> + timer: timer@010f0 {
> + compatible = "open-pic,global-timer";
> + device_type = "open-pic";
> + reg = <0x010f0 4 0x01100 0x100>;
> + interrupts = <0 0 3 0
> + 1 0 3 0
> + 2 0 3 0
> + 3 0 3 0>;
> + };
4-cell interrupt specifiers are specific to Freescale MPICs. This means
there's no way to describe the timer interrupt on a non-Freescale
openpic. Again, I suggest we not bother with this in the absence of an
actual need to support the timer on non-Freescale openpic in partitioned
scenarios. The existing openpic node is sufficient to describe the
hardware in the absence of partitioning. We could have an
"openpic-no-timer" property to indicate that we're describing it
separately, so that the absence of a timer node isn't ambiguous as to
whether it's an old tree or a partitioned scenario. An fsl,mpic
compatible would imply openpic-no-timer.
Note that I believe many of the non-Freescale openpic nodes are going to
be found on systems with real Open Firmware, so we can't go changing the
device tree for them.
-Scott
next prev parent reply other threads:[~2012-08-10 19:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-10 5:53 [PATCH v2 1/2] powerpc/mpic: Add Open-PIC global timer document Dongsheng.wang
2012-08-10 13:35 ` Gala Kumar-B11780
2012-08-13 4:10 ` Wang Dongsheng-B40534
2012-08-10 19:21 ` Scott Wood [this message]
2012-08-13 5:40 ` Wang Dongsheng-B40534
2012-08-13 17:39 ` Scott Wood
2012-08-14 2:40 ` Wang Dongsheng-B40534
2012-08-14 21:18 ` Scott Wood
2012-08-17 7:15 ` Wang Dongsheng-B40534
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=50255F49.5050500@freescale.com \
--to=scottwood@freescale.com \
--cc=Dongsheng.wang@freescale.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=kumar.gala@freescale.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.org \
/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).