diff options
author | Dario Binacchi <dariobin@libero.it> | 2020-04-13 14:36:26 +0200 |
---|---|---|
committer | Lukasz Majewski <lukma@denx.de> | 2020-08-24 11:03:26 +0200 |
commit | cd16c57bd0d6c498d5c180d70c6f0f690e9c32de (patch) | |
tree | 447c890d5b4bd56f1e7e08d42f92bc40a8060816 /include/sandbox-clk.h | |
parent | 32f462ba3bf0c8794653e6ff92ca5cbec9856c54 (diff) |
dm: test: clk: add the test for the ccf gated clock
Unlike the other clock types, in the case of the gated clock, a new
driver has been developed which does not use the registering routine
provided by the common clock framework.
The addition of the ecspi0 clock to sandbox therefore allows testing
the ccf gate clock.
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/sandbox-clk.h')
-rw-r--r-- | include/sandbox-clk.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/sandbox-clk.h b/include/sandbox-clk.h index 296cddfbb0..c2616c27a4 100644 --- a/include/sandbox-clk.h +++ b/include/sandbox-clk.h @@ -50,6 +50,14 @@ static inline struct clk *sandbox_clk_divider(const char *name, reg, shift, width, 0); } +static inline struct clk *sandbox_clk_gate(const char *name, const char *parent, + void __iomem *reg, u8 bit_idx, + u8 clk_gate_flags) +{ + return clk_register_gate(NULL, name, parent, CLK_SET_RATE_PARENT, + reg, bit_idx, clk_gate_flags, NULL); +} + struct clk *sandbox_clk_register_gate2(struct device *dev, const char *name, const char *parent_name, unsigned long flags, |