xref: /openbmc/linux/drivers/clk/mmp/reset.h (revision 84cc6674)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __MACH_MMP_CLK_RESET_H
3 #define __MACH_MMP_CLK_RESET_H
4 
5 #include <linux/reset-controller.h>
6 
7 #define MMP_RESET_INVERT	1
8 
9 struct mmp_clk_reset_cell {
10 	unsigned int clk_id;
11 	void __iomem *reg;
12 	u32 bits;
13 	unsigned int flags;
14 	spinlock_t *lock;
15 };
16 
17 struct mmp_clk_reset_unit {
18 	struct reset_controller_dev rcdev;
19 	struct mmp_clk_reset_cell *cells;
20 };
21 
22 #ifdef CONFIG_RESET_CONTROLLER
23 void mmp_clk_reset_register(struct device_node *np,
24 			struct mmp_clk_reset_cell *cells, int nr_resets);
25 #else
26 static inline void mmp_clk_reset_register(struct device_node *np,
27 			struct mmp_clk_reset_cell *cells, int nr_resets)
28 {
29 }
30 #endif
31 
32 #endif
33