diff options
-rw-r--r-- | drivers/clk/imx/Makefile | 3 | ||||
-rw-r--r-- | drivers/clk/imx/clk.c | 21 | ||||
-rw-r--r-- | drivers/clk/imx/clk.h | 3 |
3 files changed, 26 insertions, 1 deletions
diff --git a/drivers/clk/imx/Makefile b/drivers/clk/imx/Makefile index 99dbe7d17c..7806bb2849 100644 --- a/drivers/clk/imx/Makefile +++ b/drivers/clk/imx/Makefile @@ -4,7 +4,8 @@ obj-$(CONFIG_COMMON_CLK) += \ clk-pllv3.o \ clk-pfd.o \ clk-gate2.o \ - clk-gate-exclusive.o + clk-gate-exclusive.o \ + clk.o obj-$(CONFIG_ARCH_IMX1) += clk-imx1.o obj-$(CONFIG_ARCH_IMX25) += clk-imx25.o diff --git a/drivers/clk/imx/clk.c b/drivers/clk/imx/clk.c new file mode 100644 index 0000000000..7488dfcdc8 --- /dev/null +++ b/drivers/clk/imx/clk.c @@ -0,0 +1,21 @@ +#include <common.h> +#include <init.h> +#include <driver.h> +#include <linux/clk.h> +#include <io.h> +#include <of.h> +#include <linux/clkdev.h> +#include <linux/err.h> + +#include "clk.h" + +void __init imx_check_clocks(struct clk *clks[], unsigned int count) +{ + unsigned i; + + for (i = 0; i < count; i++) + if (IS_ERR(clks[i])) + pr_err("i.MX clk %u: register failed with %ld\n", + i, PTR_ERR(clks[i])); +} + diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h index 35e480f291..fd43fc2622 100644 --- a/drivers/clk/imx/clk.h +++ b/drivers/clk/imx/clk.h @@ -109,4 +109,7 @@ static inline struct clk *imx_clk_busy_mux(const char *name, void __iomem *reg, struct clk *imx_clk_gate_exclusive(const char *name, const char *parent, void __iomem *reg, u8 shift, u32 exclusive_mask); +void imx_check_clocks(struct clk *clks[], unsigned int count); + + #endif /* __IMX_CLK_H */ |