diff options
author | Haojian Zhuang <haojian.zhuang@linaro.org> | 2013-06-08 10:47:19 -0400 |
---|---|---|
committer | Mike Turquette <mturquette@linaro.org> | 2013-06-15 23:23:53 -0400 |
commit | 045779942c04646a222289989e6a5b617dfdedf7 (patch) | |
tree | e66048660ffc624543a0a36e526ce685e8d3e132 /include/linux/clk-provider.h | |
parent | d57dfe7508af2b528e26d84792edec1e7d919682 (diff) |
clk: gate: add CLK_GATE_HIWORD_MASK
In Rockchip Cortex-A9 based chips, they don't use paradigm of
reading-changing-writing the register contents. Instead they
use a hiword mask to indicate the changed bits.
When b1 should be set as gate, it also needs to indicate the change
by setting hiword mask (b1 << 16).
The patch adds gate flag for this usage.
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'include/linux/clk-provider.h')
-rw-r--r-- | include/linux/clk-provider.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index d77f1267f419..1ec14a732176 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h | |||
@@ -210,6 +210,10 @@ void of_fixed_clk_setup(struct device_node *np); | |||
210 | * CLK_GATE_SET_TO_DISABLE - by default this clock sets the bit at bit_idx to | 210 | * CLK_GATE_SET_TO_DISABLE - by default this clock sets the bit at bit_idx to |
211 | * enable the clock. Setting this flag does the opposite: setting the bit | 211 | * enable the clock. Setting this flag does the opposite: setting the bit |
212 | * disable the clock and clearing it enables the clock | 212 | * disable the clock and clearing it enables the clock |
213 | * CLK_GATE_HIWORD_MASK - The gate settings are only in lower 16-bit | ||
214 | * of this register, and mask of gate bits are in higher 16-bit of this | ||
215 | * register. While setting the gate bits, higher 16-bit should also be | ||
216 | * updated to indicate changing gate bits. | ||
213 | */ | 217 | */ |
214 | struct clk_gate { | 218 | struct clk_gate { |
215 | struct clk_hw hw; | 219 | struct clk_hw hw; |
@@ -220,6 +224,7 @@ struct clk_gate { | |||
220 | }; | 224 | }; |
221 | 225 | ||
222 | #define CLK_GATE_SET_TO_DISABLE BIT(0) | 226 | #define CLK_GATE_SET_TO_DISABLE BIT(0) |
227 | #define CLK_GATE_HIWORD_MASK BIT(1) | ||
223 | 228 | ||
224 | extern const struct clk_ops clk_gate_ops; | 229 | extern const struct clk_ops clk_gate_ops; |
225 | struct clk *clk_register_gate(struct device *dev, const char *name, | 230 | struct clk *clk_register_gate(struct device *dev, const char *name, |