From: shawn.guo@freescale.com (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] ARM: dts: imx6: use of_clk_get_by_name() to retrieve fixed-clock
Date: Fri, 11 Apr 2014 16:40:44 +0800 [thread overview]
Message-ID: <20140411084042.GF2334@dragon> (raw)
In-Reply-To: <1397203447-22965-4-git-send-email-shawn.guo@freescale.com>
On Fri, Apr 11, 2014 at 04:04:06PM +0800, Shawn Guo wrote:
> With the dependencies of those fixed input clocks reflected in device
> tree, we now can just call of_clk_get_by_name() to retrieve the clocks.
>
> Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
> ---
> arch/arm/mach-imx/clk-imx6q.c | 6 +++---
> arch/arm/mach-imx/clk-imx6sl.c | 4 ++--
> 2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c
> index b0e7f9d..862c80e 100644
> --- a/arch/arm/mach-imx/clk-imx6q.c
> +++ b/arch/arm/mach-imx/clk-imx6q.c
> @@ -148,9 +148,9 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
> int ret;
>
> 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);
> + clk[ckil] = of_clk_get_by_name(ccm_node, "ckil");
> + clk[ckih] = of_clk_get_by_name(ccm_node, "ckih1");
> + clk[osc] = of_clk_get_by_name(ccm_node, "osc");
Damn. The change will break existing DTB. Will fix it in v2.
Shawn
>
> np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-anatop");
> base = of_iomap(np, 0);
> diff --git a/arch/arm/mach-imx/clk-imx6sl.c b/arch/arm/mach-imx/clk-imx6sl.c
> index f7073c07..397f01a 100644
> --- a/arch/arm/mach-imx/clk-imx6sl.c
> +++ b/arch/arm/mach-imx/clk-imx6sl.c
> @@ -174,8 +174,8 @@ static void __init imx6sl_clocks_init(struct device_node *ccm_node)
> int ret;
>
> clks[IMX6SL_CLK_DUMMY] = imx_clk_fixed("dummy", 0);
> - clks[IMX6SL_CLK_CKIL] = imx_obtain_fixed_clock("ckil", 0);
> - clks[IMX6SL_CLK_OSC] = imx_obtain_fixed_clock("osc", 0);
> + clks[IMX6SL_CLK_CKIL] = of_clk_get_by_name(ccm_node, "ckil");
> + clks[IMX6SL_CLK_OSC] = of_clk_get_by_name(ccm_node, "osc");
>
> np = of_find_compatible_node(NULL, NULL, "fsl,imx6sl-anatop");
> base = of_iomap(np, 0);
> --
> 1.8.3.2
>
>
WARNING: multiple messages have this Message-ID (diff)
From: Shawn Guo <shawn.guo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org
Subject: Re: [PATCH 3/4] ARM: dts: imx6: use of_clk_get_by_name() to retrieve fixed-clock
Date: Fri, 11 Apr 2014 16:40:44 +0800 [thread overview]
Message-ID: <20140411084042.GF2334@dragon> (raw)
In-Reply-To: <1397203447-22965-4-git-send-email-shawn.guo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
On Fri, Apr 11, 2014 at 04:04:06PM +0800, Shawn Guo wrote:
> With the dependencies of those fixed input clocks reflected in device
> tree, we now can just call of_clk_get_by_name() to retrieve the clocks.
>
> Signed-off-by: Shawn Guo <shawn.guo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
> ---
> arch/arm/mach-imx/clk-imx6q.c | 6 +++---
> arch/arm/mach-imx/clk-imx6sl.c | 4 ++--
> 2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c
> index b0e7f9d..862c80e 100644
> --- a/arch/arm/mach-imx/clk-imx6q.c
> +++ b/arch/arm/mach-imx/clk-imx6q.c
> @@ -148,9 +148,9 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
> int ret;
>
> 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);
> + clk[ckil] = of_clk_get_by_name(ccm_node, "ckil");
> + clk[ckih] = of_clk_get_by_name(ccm_node, "ckih1");
> + clk[osc] = of_clk_get_by_name(ccm_node, "osc");
Damn. The change will break existing DTB. Will fix it in v2.
Shawn
>
> np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-anatop");
> base = of_iomap(np, 0);
> diff --git a/arch/arm/mach-imx/clk-imx6sl.c b/arch/arm/mach-imx/clk-imx6sl.c
> index f7073c07..397f01a 100644
> --- a/arch/arm/mach-imx/clk-imx6sl.c
> +++ b/arch/arm/mach-imx/clk-imx6sl.c
> @@ -174,8 +174,8 @@ static void __init imx6sl_clocks_init(struct device_node *ccm_node)
> int ret;
>
> clks[IMX6SL_CLK_DUMMY] = imx_clk_fixed("dummy", 0);
> - clks[IMX6SL_CLK_CKIL] = imx_obtain_fixed_clock("ckil", 0);
> - clks[IMX6SL_CLK_OSC] = imx_obtain_fixed_clock("osc", 0);
> + clks[IMX6SL_CLK_CKIL] = of_clk_get_by_name(ccm_node, "ckil");
> + clks[IMX6SL_CLK_OSC] = of_clk_get_by_name(ccm_node, "osc");
>
> np = of_find_compatible_node(NULL, NULL, "fsl,imx6sl-anatop");
> base = of_iomap(np, 0);
> --
> 1.8.3.2
>
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-04-11 8:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-11 8:04 [PATCH 0/4] ARM: imx6: cleanup for fixed-clock Shawn Guo
2014-04-11 8:04 ` Shawn Guo
2014-04-11 8:04 ` [PATCH 1/4] ARM: dts: imx: add required #clock-cells " Shawn Guo
2014-04-11 8:04 ` Shawn Guo
2014-04-11 8:04 ` [PATCH 2/4] ARM: dts: imx6: define input clocks to CCM block Shawn Guo
2014-04-11 8:04 ` Shawn Guo
2014-04-11 8:04 ` [PATCH 3/4] ARM: dts: imx6: use of_clk_get_by_name() to retrieve fixed-clock Shawn Guo
2014-04-11 8:04 ` Shawn Guo
2014-04-11 8:40 ` Shawn Guo [this message]
2014-04-11 8:40 ` Shawn Guo
2014-04-14 2:20 ` Shawn Guo
2014-04-14 2:20 ` Shawn Guo
2014-04-11 8:04 ` [PATCH 4/4] ARM: dts: imx6: use generic name for fixed-clock nodes Shawn Guo
2014-04-11 8:04 ` Shawn Guo
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=20140411084042.GF2334@dragon \
--to=shawn.guo@freescale.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.