#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/export.h>
#include <linux/err.h>
#include <linux/clk-provider.h>
#include <linux/io.h>
#include <linux/regmap.h>
#include <linux/mfd/syscon.h>
#include "icst.h"
#include "clk-icst.h"
#define VERSATILE_LOCK_VAL …
#define VERSATILE_AUX_OSC_BITS …
#define INTEGRATOR_AP_CM_BITS …
#define INTEGRATOR_AP_SYS_BITS …
#define INTEGRATOR_CP_CM_CORE_BITS …
#define INTEGRATOR_CP_CM_MEM_BITS …
#define INTEGRATOR_AP_PCI_25_33_MHZ …
struct clk_icst { … };
#define to_icst(_hw) …
static int vco_get(struct clk_icst *icst, struct icst_vco *vco)
{ … }
static int vco_set(struct clk_icst *icst, struct icst_vco vco)
{ … }
static unsigned long icst_recalc_rate(struct clk_hw *hw,
unsigned long parent_rate)
{ … }
static long icst_round_rate(struct clk_hw *hw, unsigned long rate,
unsigned long *prate)
{ … }
static int icst_set_rate(struct clk_hw *hw, unsigned long rate,
unsigned long parent_rate)
{ … }
static const struct clk_ops icst_ops = …;
struct clk *icst_clk_setup(struct device *dev,
const struct clk_icst_desc *desc,
const char *name,
const char *parent_name,
struct regmap *map,
enum icst_control_type ctype)
{ … }
EXPORT_SYMBOL_GPL(…);
struct clk *icst_clk_register(struct device *dev,
const struct clk_icst_desc *desc,
const char *name,
const char *parent_name,
void __iomem *base)
{ … }
EXPORT_SYMBOL_GPL(…);
#ifdef CONFIG_OF
static const struct icst_params icst525_params = …;
static const struct icst_params icst307_params = …;
static const struct icst_params icst525_apcp_cm_params = …;
static const struct icst_params icst525_ap_sys_params = …;
static const struct icst_params icst525_ap_pci_params = …;
static void __init of_syscon_icst_setup(struct device_node *np)
{ … }
CLK_OF_DECLARE(arm_syscon_icst525_clk,
"arm,syscon-icst525", of_syscon_icst_setup);
CLK_OF_DECLARE(arm_syscon_icst307_clk,
"arm,syscon-icst307", of_syscon_icst_setup);
CLK_OF_DECLARE(arm_syscon_integratorap_cm_clk,
"arm,syscon-icst525-integratorap-cm", of_syscon_icst_setup);
CLK_OF_DECLARE(arm_syscon_integratorap_sys_clk,
"arm,syscon-icst525-integratorap-sys", of_syscon_icst_setup);
CLK_OF_DECLARE(arm_syscon_integratorap_pci_clk,
"arm,syscon-icst525-integratorap-pci", of_syscon_icst_setup);
CLK_OF_DECLARE(arm_syscon_integratorcp_cm_core_clk,
"arm,syscon-icst525-integratorcp-cm-core", of_syscon_icst_setup);
CLK_OF_DECLARE(arm_syscon_integratorcp_cm_mem_clk,
"arm,syscon-icst525-integratorcp-cm-mem", of_syscon_icst_setup);
#endif