Thread (6 messages) 6 messages, 3 authors, 2017-02-21

[PATCH] clk: rockchip: Set "ignore unused" for PMU M0 clocks on rk3399

From: dianders@chromium.org (Doug Anderson)
Date: 2017-02-15 16:46:10
Also in: linux-clk, linux-rockchip, lkml

Hi,

On Wed, Feb 15, 2017 at 7:27 AM, Javier Martinez Canillas
[off-list ref] wrote:
Hello Doug,

On Tue, Feb 14, 2017 at 6:01 PM, Douglas Anderson [off-list ref] wrote:
quoted
The PMU Cortex M0 on rk3399 is intended to be used for things like
DDRFreq transitions, suspend/resume, and other things that are the
purview of ARM Trusted Firmware and not the kernel.  As such, the
kernel shouldn't be messing with the clocks.  Add CLK_IGNORE_UNUSED to
these clocks.
Isn't CLK_IS_CRITICAL a more suitable flag for this case?
As I understand it (AKA please correct me if I'm wrong)...

Usually CLK_IS_CRITICAL is more suitable than CLK_IGNORE_UNUSED since
lots of old code used CLK_IGNORE_UNUSED for critical clocks before
CLK_IS_CRITICAL existed.

...but in this case, I don't think it is more suitable.
CLK_IS_CRITICAL means that the kernel should be in charge of keeping
this clock on at all times.  The documentation I see says:

#define CLK_IS_CRITICAL         BIT(11) /* do not gate, ever */

In our case, as was so eloquently described in our private bug by our
firmware engineer:

  Just tell the kernel to keep its grubby hands off my clocks completely

AKA: this isn't a clock that the kernel should touch--it is entirely
managed by the firmware.  It's OK for the kernel to show it in the
clock tree, but otherwise "hands off".

-Doug
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help