From: Jerome Brunet <jbrunet@baylibre.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: netdev@vger.kernel.org, ingrassia@epigenesys.com,
linus.luessing@c0d3.blue, khilman@baylibre.com,
linux-amlogic@lists.infradead.org,
Neil Armstrong <narmstrong@baylibre.com>,
peppe.cavallaro@st.com, alexandre.torgue@st.com
Subject: Re: [RFT net-next 2/2] net: stmmac: dwmac-meson8b: don't try to change m250_div parent's rate
Date: Sat, 23 Dec 2017 23:41:01 +0100 [thread overview]
Message-ID: <1514068861.4333.10.camel@baylibre.com> (raw)
In-Reply-To: <CAFBinCBuyNwu9L-OhsPJ72S9xNjyAWovgjFjPXGAfri-+tDxWg@mail.gmail.com>
On Sat, 2017-12-23 at 22:49 +0100, Martin Blumenstingl wrote:
> while calculating this with a target frequency of 500MHz manually
> again I saw that there's a remainder of 10Mhz after the initial
> division.
> remainder * SDM_DEN = 163840000000 - this value overflows 32-bit,
> things will go downhill from here... :)
> long story short: here's a patch for that issue: [0]
Thanks for the fix !
>
> the results with "CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT" on the mux:
Actually, I don't think you need the CLK_SET_RATE_NO_REPARENT
> fixed_pll 3 3 2550000000
> 0 0
> mpll2 1 1 124999851
> 0 0
> c9410000.ethernet#m250_sel 1 1
> 124999851 0 0
> c9410000.ethernet#m250_div 1 1
> 124999851 0 0
> c9410000.ethernet#m25_div 1 1
> 24999971 0 0
>
> this is even closer to 25MHz than the values in the vendor driver
> (120Hz vs 29Hz)
> I'll re-spin this series, then Emiliano "just" has to confirm that
> it's also working for him (despite the dividers in the dwmac-meson8b
> driver are set up different compared to the vendor driver)
if the rate of the parent clock of mux may change, I think following part should
be changed as well
case PHY_INTERFACE_MODE_RMII:
/* Use the rate of the mux clock for the internal RMII PHY */
clk_rate = clk_get_rate(dwmac->m250_mux_clk);
I think it is a bit weak anyway, as it depends on the initial settings. Do you
remember why you wrote this way ?
>
> > > - according to the datasheet the allowed range of the mpll2 clock is
> > > 250..637MHz - 127488329Hz is what we get from the common clock
> > > framework
> >
> > Yes, I've seen that but we are able compute out of that range and, so far, the
> > actual rate of clock seems coherent with the calculation. At least, when I
> > tested with the audio, it was the case.
>
> I'm curious: ...on a GX SoCs probably?
Indeed, you got me !
next prev parent reply other threads:[~2017-12-23 22:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-23 17:04 [RFT net-next 0/2] dwmac-meson8b: clock rounding fixes for Meson8b Martin Blumenstingl
2017-12-23 17:04 ` [RFT net-next 1/2] net: stmmac: dwmac-meson8b: fix setting the PHY clock on Meson8b Martin Blumenstingl
2017-12-23 17:32 ` Jerome Brunet
2017-12-23 17:04 ` [RFT net-next 2/2] net: stmmac: dwmac-meson8b: don't try to change m250_div parent's rate Martin Blumenstingl
2017-12-23 17:40 ` Jerome Brunet
2017-12-23 17:43 ` Jerome Brunet
2017-12-23 20:00 ` Martin Blumenstingl
2017-12-23 20:40 ` Jerome Brunet
2017-12-23 21:49 ` Martin Blumenstingl
2017-12-23 22:41 ` Jerome Brunet [this message]
2017-12-23 23:12 ` Martin Blumenstingl
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=1514068861.4333.10.camel@baylibre.com \
--to=jbrunet@baylibre.com \
--cc=alexandre.torgue@st.com \
--cc=ingrassia@epigenesys.com \
--cc=khilman@baylibre.com \
--cc=linus.luessing@c0d3.blue \
--cc=linux-amlogic@lists.infradead.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=narmstrong@baylibre.com \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.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;
as well as URLs for NNTP newsgroup(s).