1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2018 Amarula Solutions.
4 * Author: Jagan Teki <jagan@amarulasolutions.com>
10 #include <linux/bitops.h>
13 * enum ccu_flags - ccu clock/reset flags
15 * @CCU_CLK_F_IS_VALID: is given clock gate is valid?
16 * @CCU_RST_F_IS_VALID: is given reset control is valid?
19 CCU_CLK_F_IS_VALID = BIT(0),
20 CCU_RST_F_IS_VALID = BIT(1),
21 CCU_CLK_F_DUMMY_GATE = BIT(2),
25 * struct ccu_clk_gate - ccu clock gate
28 * @flags: ccu clock gate flags
36 #define GATE(_off, _bit) { \
39 .flags = CCU_CLK_F_IS_VALID, \
42 #define GATE_DUMMY { \
43 .flags = CCU_CLK_F_DUMMY_GATE, \
47 * struct ccu_reset - ccu reset
50 * @flags: ccu reset control flags
58 #define RESET(_off, _bit) { \
61 .flags = CCU_RST_F_IS_VALID, \
65 * struct ccu_desc - clock control unit descriptor
71 const struct ccu_clk_gate *gates;
72 const struct ccu_reset *resets;
78 * struct ccu_plat - sunxi clock control unit platform data
81 * @desc: ccu descriptor
85 const struct ccu_desc *desc;
88 extern struct clk_ops sunxi_clk_ops;
90 #endif /* _CLK_SUNXI_H */