#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/io.h>
#include <linux/slab.h>
#include <linux/clkdev.h>
#include <linux/delay.h>
#include "clk-mtk.h"
#include "clk-pllfh.h"
#include "clk-fhctl.h"
static DEFINE_SPINLOCK(pllfh_lock);
inline struct mtk_fh *to_mtk_fh(struct clk_hw *hw)
{ … }
static int mtk_fhctl_set_rate(struct clk_hw *hw, unsigned long rate,
unsigned long parent_rate)
{ … }
static const struct clk_ops mtk_pllfh_ops = …;
static struct mtk_pllfh_data *get_pllfh_by_id(struct mtk_pllfh_data *pllfhs,
int num_fhs, int pll_id)
{ … }
void fhctl_parse_dt(const u8 *compatible_node, struct mtk_pllfh_data *pllfhs,
int num_fhs)
{ … }
EXPORT_SYMBOL_GPL(…);
static int pllfh_init(struct mtk_fh *fh, struct mtk_pllfh_data *pllfh_data)
{ … }
static bool fhctl_is_supported_and_enabled(const struct mtk_pllfh_data *pllfh)
{ … }
static struct clk_hw *
mtk_clk_register_pllfh(const struct mtk_pll_data *pll_data,
struct mtk_pllfh_data *pllfh_data, void __iomem *base)
{ … }
static void mtk_clk_unregister_pllfh(struct clk_hw *hw)
{ … }
int mtk_clk_register_pllfhs(struct device_node *node,
const struct mtk_pll_data *plls, int num_plls,
struct mtk_pllfh_data *pllfhs, int num_fhs,
struct clk_hw_onecell_data *clk_data)
{ … }
EXPORT_SYMBOL_GPL(…);
void mtk_clk_unregister_pllfhs(const struct mtk_pll_data *plls, int num_plls,
struct mtk_pllfh_data *pllfhs, int num_fhs,
struct clk_hw_onecell_data *clk_data)
{ … }
EXPORT_SYMBOL_GPL(…);