[PATCH 03/18] CLK: Add fractional divider clock support from Linux kernel.
Sascha Hauer
s.hauer at pengutronix.de
Mon Mar 2 23:51:27 PST 2015
On Mon, Mar 02, 2015 at 11:21:47PM +0300, Andrey Panov wrote:
> Arch Kconfig should select CLK_NEED_FDIV to have this support
> compiled in.
>
> Signed-off-by: Andrey Panov <rockford at yandex.ru>
> ---
> drivers/clk/Kconfig | 3 +
> drivers/clk/Makefile | 1 +
> drivers/clk/clk-fractional-divider.c | 156 +++++++++++++++++++++++++++++++++++
> include/linux/clk.h | 9 ++
> 4 files changed, 169 insertions(+)
> create mode 100644 drivers/clk/clk-fractional-divider.c
>
> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
> index 6db1f33..e82b566 100644
> --- a/drivers/clk/Kconfig
> +++ b/drivers/clk/Kconfig
> @@ -11,6 +11,9 @@ config COMMON_CLK
> config CLK_NEED_COMPOSITE
> bool
>
> +config CLK_NEED_FDIV
> + bool
> +
No separate option needed.
> +struct clk *clk_fractional_divider_alloc(
> + const char *name, const char *parent_name, unsigned long flags,
> + void __iomem *reg, u8 mshift, u8 mwidth, u8 nshift, u8 nwidth,
> + u8 clk_divider_flags)
> +{
> + struct clk_fractional_divider *fd;
> +
> + fd = kzalloc(sizeof(*fd), GFP_KERNEL);
> + if (!fd) {
> + pr_err("could not allocate fractional divider clk %s\n", name);
> + return ERR_PTR(-ENOMEM);
> + }
xzalloc
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list