All of lore.kernel.org
 help / color / mirror / Atom feed
From: jbrunet@baylibre.com (Jerome Brunet)
To: linus-amlogic@lists.infradead.org
Subject: [PATCH 1/4] clk: meson8b: keep mpll2 clock enabled
Date: Thu, 28 Sep 2017 17:08:24 +0200	[thread overview]
Message-ID: <1506611304.16686.65.camel@baylibre.com> (raw)
In-Reply-To: <20170928095952.GA24801@ingrassia.epigenesys.com>

On Thu, 2017-09-28 at 11:59 +0200, Emiliano Ingrassia wrote:
> Hi Jerome,
> 
> thanks for review!
> 
> On Thu, Sep 28, 2017 at 09:11:49AM +0200, Jerome Brunet wrote:
> > On Wed, 2017-09-27 at 12:40 +0200, Emiliano Ingrassia wrote:
> > > The mpll2 clock, enabled by the bootloader, is disabled at boot.
> > > Enabling ethernet on Odroid-C1+ board leads to DMA initialization failure
> > > caused by a timeout on reset.
> > > Keeping the mpll2 clock enabled solve this issue.
> > 
> > Shouldn't the DMA driver emable the clocks it needs itself instead ?
> > BTW, I'm bit surprised an mpll is used to clock a DMA, is it possible we
> > missed
> > something here ?
> > 
> 
> The mpll2 clocks the meson8b ethernet controller which, as one can suppose,
> internally have a DMA engine. If the controller is enabled, the first
> operation on hardware is the DMA engine reset which fails if mpll2 is
> disabled.

I understand. I mentioned that's it strange to use mpll2 because:
- On gxbb (and following SoCs), There is 2 clockin sources to the mac: FDIV2 and
MPLL2. There is , of course, an mux in the ethernet device to select the clock
you need/want.
- I would not be surprised if it was the same thing on meson8(b). In such case,
I think it is better to use FDIV2.

> Actually the patch not only solves that issue, but also permits the
> ethernet controller to work correctly.
> The correct solution would be to enable the mpll2 clock from dwmac-meson8b
> driver;

Indeed.
I would prefer that you fix the ethernet driver rather than adding this to the
clock driver.


> I'm working on this.
> In the meantime I release this patch to give others the chance
> to use the ethernet controller on Odroid-C1/C1+.
> 

Ok

> Regards,
> 
> Emiliano
> 
> > > 
> > > Signed-off-by: Emiliano Ingrassia <ingrassia@epigenesys.com>
> > > ---
> > >  drivers/clk/meson/meson8b.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c
> > > index 20ab7190d328..5096539e4a63 100644
> > > --- a/drivers/clk/meson/meson8b.c
> > > +++ b/drivers/clk/meson/meson8b.c
> > > @@ -347,6 +347,7 @@ static struct meson_clk_mpll meson8b_mpll2 = {
> > >  		.ops = &meson_clk_mpll_ops,
> > >  		.parent_names = (const char *[]){ "fixed_pll" },
> > >  		.num_parents = 1,
> > > +		.flags = (CLK_SET_RATE_NO_REPARENT | CLK_IGNORE_UNUSED),
> > >  	},
> > >  };
> > >  

  reply	other threads:[~2017-09-28 15:08 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-27 10:39 [PATCH 0/4] meson8b-odroidc1: ethernet support Emiliano Ingrassia
2017-09-27 10:40 ` [PATCH 1/4] clk: meson8b: keep mpll2 clock enabled Emiliano Ingrassia
2017-09-28  7:11   ` Jerome Brunet
2017-09-28  9:59     ` Emiliano Ingrassia
2017-09-28 15:08       ` Jerome Brunet [this message]
2017-09-28 21:29         ` Martin Blumenstingl
2017-09-30 17:08           ` Emiliano Ingrassia
2017-09-27 10:40 ` [PATCH 2/4] ARM: dts: meson8b: extending ethernet controller description Emiliano Ingrassia
2017-09-27 10:41 ` [PATCH 3/4] ARM: dts: meson8b-odroidc1: enabling ethernet support Emiliano Ingrassia
2017-09-27 10:46 ` [PATCH 4/4] net: stmmac: fixing DMA reset sleep and timeout values Emiliano Ingrassia
2017-09-27 10:46   ` Emiliano Ingrassia
2017-09-27 21:39 ` [PATCH 2/4] ARM: dts: meson8b: extending ethernet controller description Emiliano Ingrassia
2017-09-28  2:23   ` Linus Lüssing
2017-09-28 10:31     ` Emiliano Ingrassia
2017-09-28 21:41   ` Martin Blumenstingl
2017-09-29 19:10     ` Emiliano Ingrassia
2017-09-30 14:09       ` Martin Blumenstingl
2017-11-21 15:36         ` Emiliano Ingrassia
2017-11-26 21:02           ` Martin Blumenstingl
2017-11-26 21:58             ` Martin Blumenstingl
2017-12-04 22:37             ` Emiliano Ingrassia
2017-12-16 23:39               ` Martin Blumenstingl
2017-12-18 20:07                 ` Emiliano Ingrassia
2017-10-02 19:54 ` [PATCH 0/4] meson8b-odroidc1: ethernet support Linus Lüssing
2017-10-06  8:10   ` Emiliano Ingrassia
2017-11-21 11:57   ` Linus Lüssing
2017-11-21 15:40     ` Emiliano Ingrassia

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=1506611304.16686.65.camel@baylibre.com \
    --to=jbrunet@baylibre.com \
    --cc=linus-amlogic@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.