mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
clk: rockchip: add flag CLK_GATE_NO_SET_RATE
Add CLK_GATE_NO_SET_RATE for gate clks not allowed to support setting rate. Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com> Change-Id: Iddd1c958661f8ff9217b8781426314b0619367db
This commit is contained in:
@@ -618,7 +618,8 @@ void __init rockchip_clk_register_branches(
|
||||
flags, &ctx->lock);
|
||||
break;
|
||||
case branch_gate:
|
||||
flags |= CLK_SET_RATE_PARENT;
|
||||
if (!(list->gate_flags & CLK_GATE_NO_SET_RATE))
|
||||
flags |= CLK_SET_RATE_PARENT;
|
||||
|
||||
clk = clk_register_gate(NULL, list->name,
|
||||
list->parent_names[0], flags,
|
||||
|
||||
@@ -445,6 +445,8 @@ void of_fixed_clk_setup(struct device_node *np);
|
||||
* of this register, and mask of gate bits are in higher 16-bit of this
|
||||
* register. While setting the gate bits, higher 16-bit should also be
|
||||
* updated to indicate changing gate bits.
|
||||
* CLK_GATE_NO_SET_RATE - The Gate not allowed to set rate.
|
||||
* And not allowed to set parent rate.
|
||||
*/
|
||||
struct clk_gate {
|
||||
struct clk_hw hw;
|
||||
@@ -458,6 +460,7 @@ struct clk_gate {
|
||||
|
||||
#define CLK_GATE_SET_TO_DISABLE BIT(0)
|
||||
#define CLK_GATE_HIWORD_MASK BIT(1)
|
||||
#define CLK_GATE_NO_SET_RATE BIT(3)
|
||||
|
||||
extern const struct clk_ops clk_gate_ops;
|
||||
struct clk *clk_register_gate(struct device *dev, const char *name,
|
||||
|
||||
Reference in New Issue
Block a user