linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: Linux PPC Mailing List <linuxppc-dev@lists.ozlabs.org>
Subject: MPC8360, quicc engine, bus-frequency and brg-frequency
Date: Sat, 7 May 2016 08:39:33 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LFD.2.20.1605070824370.4477@localhost.localdomain> (raw)


  currently working on a project porting linux (4.1 kernel right now)
to MPC8360-based target board and, recently, was handed the following
patch to apply to that board's DTS file:

@@ -168,8 +168,8 @@
                compatible = "fsl,qe", "simple-bus";
                ranges = <0 0xf0100000 0x00100000>;
                reg = <0xf0100000 0x480>;
-               brg-frequency = <0>;
-               bus-frequency = <0xFBC5200>; // 264Mhz
+               brg-frequency = <198000000>;
+               bus-frequency = <396000000>;
                fsl,qe-num-riscs = <2>;
                fsl,qe-num-snums = <28>;


to get the result:

        qe@f0100000 {
                #address-cells = <1>;
                #size-cells = <1>;
                device_type = "qe";
                compatible = "fsl,qe", "simple-bus";
                ranges = <0 0xf0100000 0x00100000>;
                reg = <0xf0100000 0x480>;
                brg-frequency = <198000000>;              <-----
                bus-frequency = <396000000>;              <-----
                fsl,qe-num-riscs = <2>;
                fsl,qe-num-snums = <28>;


but there was no explanation that came with the patch and i'm trying
to guess the rationale.

  first, regarding brg-frequency, if i examine the collection of PPC
.dts files in the kernel source right now, i see this:

$ grep -r brg-frequency *
fsl/mpc8568si-post.dtsi:	brg-frequency = <0>;
fsl/mpc8569si-post.dtsi:	brg-frequency = <0>;
kmeter1.dts:			brg-frequency = <0>;	/* Filled in by U-Boot */
mpc832x_mds.dts:		brg-frequency = <0>;
mpc832x_rdb.dts:		brg-frequency = <0>;
mpc836x_mds.dts:		brg-frequency = <0>;
mpc836x_rdk.dts:			brg-frequency = <0>;
mpc866ads.dts:			brg-frequency = <0>;
p1021mds.dts:		brg-frequency = <0>;
p1021rdb-pc_32b.dts:                brg-frequency = <0>;
p1021rdb-pc_36b.dts:                brg-frequency = <0>;
p1025rdb_32b.dts:		brg-frequency = <0>;
p1025twr.dts:		brg-frequency = <0>;
tqm8xx.dts:			brg-frequency = <0>;
$

  so, based on the above, no one else is setting brg-frequency, and
kmeter1.dts even makes it clear that that value is filled in by
u-boot, so what is even a *possible* rationale for setting it
explicitly rather than letting u-boot look after it?

  as for bus-frequency, another sweeping grep exposes this in
mpc836x.dts:

... snip ...

        cpus {
                #address-cells = <1>;
                #size-cells = <0>;

                PowerPC,8360@0 {
                        device_type = "cpu";
                        reg = <0x0>;
                        d-cache-line-size = <32>;       // 32 bytes
                        i-cache-line-size = <32>;       // 32 bytes
                        d-cache-size = <32768>;         // L1, 32K
                        i-cache-size = <32768>;         // L1, 32K
                        timebase-frequency = <66000000>;
                        bus-frequency = <264000000>;

... snip ...

        qe@e0100000 {
                #address-cells = <1>;
                #size-cells = <1>;
                device_type = "qe";
                compatible = "fsl,qe";
                ranges = <0x0 0xe0100000 0x00100000>;
                reg = <0xe0100000 0x480>;
                brg-frequency = <0>;
                bus-frequency = <396000000>;
                fsl,qe-num-riscs = <2>;
                fsl,qe-num-snums = <28>;

... snip ...


where i can see that the system (?) bus is set to 264MHz, but the QE
bus is set to 396MHz. i'm in no way an authority on PowerPC -- this
looks like someone accidentally set the QE bus speed originally to a
valid value for the system bus, and just realized that, oops, it
should have been 396MHz all along.

  anyway, to recap, just trying to understand what this patch under
"qe@f0100000" might mean:

-               brg-frequency = <0>;
-               bus-frequency = <0xFBC5200>; // 264Mhz
+               brg-frequency = <198000000>;
+               bus-frequency = <396000000>;

thank you kindly.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

                 reply	other threads:[~2016-05-07 12:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=alpine.LFD.2.20.1605070824370.4477@localhost.localdomain \
    --to=rpjday@crashcourse.ca \
    --cc=linuxppc-dev@lists.ozlabs.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).