#include <linux/spinlock.h>
DEFINE_SPINLOCK(imx_ccm_lock);
void __init imx_check_clocks(struct clk *clks[], unsigned int count)
for (i = 0; i < count; i++)
pr_err("i.MX clk %u: register failed with %ld\n",
void imx_check_clk_hws(struct clk_hw *clks[], unsigned int count)
for (i = 0; i < count; i++)
pr_err("i.MX clk %u: register failed with %ld\n",
static struct clk * __init imx_obtain_fixed_clock_from_dt(const char *name)
struct of_phandle_args phandle;
struct clk *clk = ERR_PTR(-ENODEV);
path = kasprintf(GFP_KERNEL, "/clocks/%s", name);
phandle.np = of_find_node_by_path(path);
clk = of_clk_get_from_provider(&phandle);
struct clk * __init imx_obtain_fixed_clock(
const char *name, unsigned long rate)
clk = imx_obtain_fixed_clock_from_dt(name);
clk = imx_clk_fixed(name, rate);
struct clk_hw * __init imx_obtain_fixed_clk_hw(struct device_node *np,