#include <linux/bits.h>
#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/io.h>
#include <linux/slab.h>
#include <linux/jiffies.h>
#include <linux/err.h>
#include "clk.h"
static int clk_busy_wait(void __iomem *reg, u8 shift)
{ … }
struct clk_busy_divider { … };
static inline struct clk_busy_divider *to_clk_busy_divider(struct clk_hw *hw)
{ … }
static unsigned long clk_busy_divider_recalc_rate(struct clk_hw *hw,
unsigned long parent_rate)
{ … }
static long clk_busy_divider_round_rate(struct clk_hw *hw, unsigned long rate,
unsigned long *prate)
{ … }
static int clk_busy_divider_set_rate(struct clk_hw *hw, unsigned long rate,
unsigned long parent_rate)
{ … }
static const struct clk_ops clk_busy_divider_ops = …;
struct clk_hw *imx_clk_hw_busy_divider(const char *name, const char *parent_name,
void __iomem *reg, u8 shift, u8 width,
void __iomem *busy_reg, u8 busy_shift)
{ … }
struct clk_busy_mux { … };
static inline struct clk_busy_mux *to_clk_busy_mux(struct clk_hw *hw)
{ … }
static u8 clk_busy_mux_get_parent(struct clk_hw *hw)
{ … }
static int clk_busy_mux_set_parent(struct clk_hw *hw, u8 index)
{ … }
static const struct clk_ops clk_busy_mux_ops = …;
struct clk_hw *imx_clk_hw_busy_mux(const char *name, void __iomem *reg, u8 shift,
u8 width, void __iomem *busy_reg, u8 busy_shift,
const char * const *parent_names, int num_parents)
{ … }