mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 18:39:59 +00:00
![Chao Xie](/assets/img/avatar_default.png)
Some clock control regsiter has bit to reset the cotroller. So before enable the clock, we need deassert the reset pin. Make use of reset controller framework to export reset interface for device drivers, then device driver can control the reset action. Signed-off-by: Chao Xie <chao.xie@marvell.com> Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com> Signed-off-by: Michael Turquette <mturquette@linaro.org>
31 lines
635 B
C
31 lines
635 B
C
#ifndef __MACH_MMP_CLK_RESET_H
|
|
#define __MACH_MMP_CLK_RESET_H
|
|
|
|
#include <linux/reset-controller.h>
|
|
|
|
#define MMP_RESET_INVERT 1
|
|
|
|
struct mmp_clk_reset_cell {
|
|
unsigned int clk_id;
|
|
void __iomem *reg;
|
|
u32 bits;
|
|
unsigned int flags;
|
|
spinlock_t *lock;
|
|
};
|
|
|
|
struct mmp_clk_reset_unit {
|
|
struct reset_controller_dev rcdev;
|
|
struct mmp_clk_reset_cell *cells;
|
|
};
|
|
|
|
#ifdef CONFIG_RESET_CONTROLLER
|
|
void mmp_clk_reset_register(struct device_node *np,
|
|
struct mmp_clk_reset_cell *cells, int nr_resets);
|
|
#else
|
|
static inline void mmp_clk_reset_register(struct device_node *np,
|
|
struct mmp_clk_reset_cell *cells, int nr_resets)
|
|
{
|
|
}
|
|
#endif
|
|
|
|
#endif
|