public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: mturquette@linaro.org (Mike Turquette)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] ARM: imx6q: call of_clk_init() to register fixed rate clocks
Date: Thu, 23 May 2013 10:30:05 -0700	[thread overview]
Message-ID: <20130523173005.6058.9635@quantum> (raw)
In-Reply-To: <1369102324-3084-1-git-send-email-shawn.guo@linaro.org>

Quoting Shawn Guo (2013-05-20 19:12:03)
> As the fixed rate clocks are defined in device tree, we can just call
> of_clk_init() to register them.
> 
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>

Acked-by: Mike Turquette <mturquette@linaro.org>

Regards,
Mike

> ---
>  arch/arm/mach-imx/clk-imx6q.c |   19 +++++--------------
>  1 file changed, 5 insertions(+), 14 deletions(-)
> 
> diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c
> index a805911..1b883c7 100644
> --- a/arch/arm/mach-imx/clk-imx6q.c
> +++ b/arch/arm/mach-imx/clk-imx6q.c
> @@ -276,21 +276,12 @@ int __init mx6q_clocks_init(void)
>         void __iomem *base;
>         int i, irq;
>  
> -       clk[dummy] = imx_clk_fixed("dummy", 0);
> +       of_clk_init(NULL);
>  
> -       /* retrieve the freqency of fixed clocks from device tree */
> -       for_each_compatible_node(np, NULL, "fixed-clock") {
> -               u32 rate;
> -               if (of_property_read_u32(np, "clock-frequency", &rate))
> -                       continue;
> -
> -               if (of_device_is_compatible(np, "fsl,imx-ckil"))
> -                       clk[ckil] = imx_clk_fixed("ckil", rate);
> -               else if (of_device_is_compatible(np, "fsl,imx-ckih1"))
> -                       clk[ckih] = imx_clk_fixed("ckih", rate);
> -               else if (of_device_is_compatible(np, "fsl,imx-osc"))
> -                       clk[osc] = imx_clk_fixed("osc", rate);
> -       }
> +       clk[dummy] = imx_clk_fixed("dummy", 0);
> +       clk[ckil] = imx_obtain_fixed_clock("ckil", 0);
> +       clk[ckih] = imx_obtain_fixed_clock("ckih1", 0);
> +       clk[osc] = imx_obtain_fixed_clock("osc", 0);
>  
>         np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-anatop");
>         base = of_iomap(np, 0);
> -- 
> 1.7.9.5
> 
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      parent reply	other threads:[~2013-05-23 17:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-21  2:12 [PATCH 1/2] ARM: imx6q: call of_clk_init() to register fixed rate clocks Shawn Guo
2013-05-21  2:12 ` [PATCH 2/2] ARM: imx6: use common of_clk_init() call to initialize clocks Shawn Guo
2013-05-23 17:30 ` Mike Turquette [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130523173005.6058.9635@quantum \
    --to=mturquette@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox