clk: gate: add clk_always_on for debug
use: bootargs = "earlycon=uart8250,mmio32,0xfe660000 console=ttyFIQ0 clk_gate.always_on=y"; Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com> Change-Id: Iff38f71b31bf1de4b5e18bdaefd695d60cd2e124
This commit is contained in:
committed by
Finley Xiao
parent
a8b8bfcdf5
commit
5aef9fb666
@ -16,6 +16,10 @@
|
||||
#include <linux/err.h>
|
||||
#include <linux/string.h>
|
||||
|
||||
static bool clk_always_on;
|
||||
module_param_named(always_on, clk_always_on, bool, 0644);
|
||||
MODULE_PARM_DESC(always_on, "Always keep clks on except for system suspend.");
|
||||
|
||||
/**
|
||||
* DOC: basic gatable clock which can gate and ungate it's ouput
|
||||
*
|
||||
@ -46,6 +50,9 @@ static void clk_gate_endisable(struct clk_hw *hw, int enable)
|
||||
unsigned long uninitialized_var(flags);
|
||||
u32 reg;
|
||||
|
||||
if (clk_always_on && !enable)
|
||||
return;
|
||||
|
||||
set ^= enable;
|
||||
|
||||
if (gate->lock)
|
||||
|
||||
Reference in New Issue
Block a user