Linux clock framework development
 help / color / mirror / Atom feed
From: Eric Anholt <eric@anholt.net>
To: Phil Elwell <phil@raspberrypi.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Stefan Wahren <stefan.wahren@i2se.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	linux-clk@vger.kernel.org, linux-rpi-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] clk: bcm2835: Limit PCM clock to OSC and PLLD_PER
Date: Wed, 31 May 2017 14:24:26 -0700	[thread overview]
Message-ID: <87efv4btyt.fsf@eliezer.anholt.net> (raw)
In-Reply-To: <866b60bb-d1c8-726e-3a2d-11a34f9e8ac7@raspberrypi.org>

[-- Attachment #1: Type: text/plain, Size: 1850 bytes --]

Phil Elwell <phil@raspberrypi.org> writes:

> Restrict clock sources for the PCM peripheral to the oscillator and
> PLLD_PER because other source may have varying rates or be switched off.
> Prevent other sources from being selected by replacing their names in
> the list of potential parents with dummy entries (entry index is
> significant).

I might be up for giving my r-b on this, but first I'd like to check if
we can simplify even more.  Looking through this list:

static const char *const bcm2835_clock_per_parents[] = {
	"gnd",
	"xosc",
	"testdebug0",
	"testdebug1",
	"plla_per",
	"pllc_per",
	"plld_per",
	"pllh_aux",
};

PLLA is off and unused and we don't want any peripheral to turn it on
(unless we wanted PCM to do so, but we aren't doing that here).

PLLC's rate gets changed by the VPU and so it isn't reliable.
67615c588a059b731df9d019edc3c561d8006ec9 made it so that nobody uses it
that isn't using it by firmware setup, and EMMC is the only one that the
firmware is having use PLLC.  Would we be better off just having EMMC
always be on PLLD?  Or, we could special-case EMMC to be the only one to
use PLLC.

PLLD is stable.

PLLH should only be used as a parent by VEC (or HSM, assuming that
drm/vc4 rate-sets PLLH_PIX first, but I don't know of a reason for HSM
to not just be fractionally divided off of PLLD).  If you've got
firmware display in use, it may change rate or be disabled behind
Linux's back, so we don't want anything but Linux-controlled VEC to use
it.  We could special-case VEC to be the only one that had PLLH_AUX as
parent.

So, my proposal would be to basically make everything but VEC and maybe
EMMC use your new list, and drop the code in
67615c588a059b731df9d019edc3c561d8006ec9.  That said, if you want to do
this first for PCM and then extend it to the rest of the clock
consumers, I'm fine with that.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  parent reply	other threads:[~2017-05-31 21:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-30 16:28 [PATCH 1/2] clk: bcm2835: Limit PCM clock to OSC and PLLD_PER Phil Elwell
2017-05-30 18:41 ` Stefan Wahren
2017-05-31  8:28   ` Phil Elwell
2017-05-31  8:59     ` Stefan Wahren
2017-05-31  9:18 ` [PATCH v2 " Phil Elwell
2017-06-01 13:41   ` kbuild test robot
2017-05-31 21:24 ` Eric Anholt [this message]
2017-06-01  8:46   ` [PATCH " Phil Elwell

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=87efv4btyt.fsf@eliezer.anholt.net \
    --to=eric@anholt.net \
    --cc=f.fainelli@gmail.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=mturquette@baylibre.com \
    --cc=phil@raspberrypi.org \
    --cc=sboyd@codeaurora.org \
    --cc=stefan.wahren@i2se.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