linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: marek.vasut@gmail.com (Marek Vasut)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 02/12] arm/mxs: convert platform code to clk_prepare/clk_unprepare
Date: Tue, 20 Dec 2011 14:44:40 +0100	[thread overview]
Message-ID: <201112201444.40509.marek.vasut@gmail.com> (raw)
In-Reply-To: <1324382443-4439-3-git-send-email-shawn.guo@linaro.org>

> The patch converts mxs platform code to clk_prepare/clk_unprepare
> by using helper functions clk_prepare_enable/clk_disable_unprepare.
> 
> Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---
>  arch/arm/mach-mxs/clock-mx23.c   |   10 +++++-----
>  arch/arm/mach-mxs/clock-mx28.c   |   10 +++++-----
>  arch/arm/mach-mxs/clock.c        |    2 +-
>  arch/arm/mach-mxs/mach-mx28evk.c |    2 +-
>  arch/arm/mach-mxs/system.c       |    2 +-
>  arch/arm/mach-mxs/timer.c        |    2 +-
>  6 files changed, 14 insertions(+), 14 deletions(-)
> 
> diff --git a/arch/arm/mach-mxs/clock-mx23.c
> b/arch/arm/mach-mxs/clock-mx23.c index 0163b6d..e12e112 100644
> --- a/arch/arm/mach-mxs/clock-mx23.c
> +++ b/arch/arm/mach-mxs/clock-mx23.c
> @@ -545,11 +545,11 @@ int __init mx23_clocks_init(void)
>  	 */
>  	clk_set_parent(&ssp_clk, &ref_io_clk);
> 
> -	clk_enable(&cpu_clk);
> -	clk_enable(&hbus_clk);
> -	clk_enable(&xbus_clk);
> -	clk_enable(&emi_clk);
> -	clk_enable(&uart_clk);
> +	clk_prepare_enable(&cpu_clk);
> +	clk_prepare_enable(&hbus_clk);
> +	clk_prepare_enable(&xbus_clk);
> +	clk_prepare_enable(&emi_clk);
> +	clk_prepare_enable(&uart_clk);
> 
>  	clkdev_add_table(lookups, ARRAY_SIZE(lookups));
> 
> diff --git a/arch/arm/mach-mxs/clock-mx28.c
> b/arch/arm/mach-mxs/clock-mx28.c index da6e4aa..f85f1f5 100644
> --- a/arch/arm/mach-mxs/clock-mx28.c
> +++ b/arch/arm/mach-mxs/clock-mx28.c
> @@ -775,11 +775,11 @@ int __init mx28_clocks_init(void)
>  	clk_set_parent(&ssp0_clk, &ref_io0_clk);
>  	clk_set_parent(&ssp1_clk, &ref_io0_clk);
> 
> -	clk_enable(&cpu_clk);
> -	clk_enable(&hbus_clk);
> -	clk_enable(&xbus_clk);
> -	clk_enable(&emi_clk);
> -	clk_enable(&uart_clk);
> +	clk_prepare_enable(&cpu_clk);
> +	clk_prepare_enable(&hbus_clk);
> +	clk_prepare_enable(&xbus_clk);
> +	clk_prepare_enable(&emi_clk);
> +	clk_prepare_enable(&uart_clk);
> 
>  	clk_set_parent(&lcdif_clk, &ref_pix_clk);
>  	clk_set_parent(&saif0_clk, &pll0_clk);
> diff --git a/arch/arm/mach-mxs/clock.c b/arch/arm/mach-mxs/clock.c
> index a7093c8..755eec0 100644
> --- a/arch/arm/mach-mxs/clock.c
> +++ b/arch/arm/mach-mxs/clock.c
> @@ -166,7 +166,7 @@ int clk_set_parent(struct clk *clk, struct clk *parent)
>  		return ret;
> 
>  	if (clk->usecount)
> -		clk_enable(parent);
> +		clk_prepare_enable(parent);
> 
>  	mutex_lock(&clocks_mutex);
>  	ret = clk->set_parent(clk, parent);
> diff --git a/arch/arm/mach-mxs/mach-mx28evk.c
> b/arch/arm/mach-mxs/mach-mx28evk.c index 064ec5a..6b9e83e 100644
> --- a/arch/arm/mach-mxs/mach-mx28evk.c
> +++ b/arch/arm/mach-mxs/mach-mx28evk.c
> @@ -228,7 +228,7 @@ static void __init mx28evk_fec_reset(void)
>  	/* Enable fec phy clock */
>  	clk = clk_get_sys("pll2", NULL);
>  	if (!IS_ERR(clk))
> -		clk_enable(clk);
> +		clk_prepare_enable(clk);
> 
>  	/* Power up fec phy */
>  	ret = gpio_request(MX28EVK_FEC_PHY_POWER, "fec-phy-power");
> diff --git a/arch/arm/mach-mxs/system.c b/arch/arm/mach-mxs/system.c
> index 20ec3bd..9760a12 100644
> --- a/arch/arm/mach-mxs/system.c
> +++ b/arch/arm/mach-mxs/system.c
> @@ -66,7 +66,7 @@ static int __init mxs_arch_reset_init(void)
> 
>  	clk = clk_get_sys("rtc", NULL);
>  	if (!IS_ERR(clk))
> -		clk_enable(clk);
> +		clk_prepare_enable(clk);
> 

I still wonder how to handle the DUART -- amba-pl011 -- maybe we should toggle 
the clock here too ?

M

>  	return 0;
>  }
> diff --git a/arch/arm/mach-mxs/timer.c b/arch/arm/mach-mxs/timer.c
> index cace0d2..564a632 100644
> --- a/arch/arm/mach-mxs/timer.c
> +++ b/arch/arm/mach-mxs/timer.c
> @@ -245,7 +245,7 @@ static int __init mxs_clocksource_init(struct clk
> *timer_clk)
> 
>  void __init mxs_timer_init(struct clk *timer_clk, int irq)
>  {
> -	clk_enable(timer_clk);
> +	clk_prepare_enable(timer_clk);
> 
>  	/*
>  	 * Initialize timers to a known state

  reply	other threads:[~2011-12-20 13:44 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-20 12:00 [PATCH 0/12] Add clk_prepare/clk_unprepare for mxs clock api Shawn Guo
2011-12-20 12:00 ` [PATCH 01/12] clk: add helper functions clk_prepare_enable and clk_disable_unprepare Shawn Guo
2011-12-20 13:48   ` Marek Vasut
2011-12-20 14:09     ` Shawn Guo
2011-12-20 12:00 ` [PATCH 02/12] arm/mxs: convert platform code to clk_prepare/clk_unprepare Shawn Guo
2011-12-20 13:44   ` Marek Vasut [this message]
2011-12-20 21:11     ` Russell King - ARM Linux
2011-12-20 21:28       ` Marek Vasut
2011-12-20 12:00 ` [PATCH 03/12] net: fec: add clk_prepare/clk_unprepare Shawn Guo
2011-12-20 13:45   ` Marek Vasut
2011-12-20 12:00 ` [PATCH 04/12] dma: mxs-dma: convert to clk_prepare/clk_unprepare Shawn Guo
2011-12-20 13:45   ` Marek Vasut
2011-12-23 17:35     ` Vinod Koul
2011-12-20 12:00 ` [PATCH 05/12] mmc: mxs-mmc: " Shawn Guo
2011-12-20 13:45   ` Marek Vasut
2011-12-20 12:00 ` [PATCH 06/12] mtd: gpmi-lib: " Shawn Guo
2011-12-20 13:46   ` Marek Vasut
2011-12-20 12:00 ` [PATCH 07/12] net: flexcan: " Shawn Guo
2011-12-20 13:48   ` Marek Vasut
2011-12-20 14:23     ` Shawn Guo
2011-12-20 12:00 ` [PATCH 08/12] serial: mxs-auart: " Shawn Guo
2011-12-20 13:49   ` Marek Vasut
2011-12-20 14:07     ` Uwe Kleine-König
2011-12-20 21:15       ` Russell King - ARM Linux
2011-12-20 21:28         ` Marek Vasut
2011-12-20 22:24           ` Russell King - ARM Linux
2011-12-21  1:06             ` Marek Vasut
2011-12-20 14:27     ` Shawn Guo
2011-12-20 12:00 ` [PATCH 09/12] video: mxsfb: " Shawn Guo
2011-12-20 13:49   ` Marek Vasut
2011-12-21  2:11   ` Florian Tobias Schandinat
2011-12-20 12:00 ` [PATCH 10/12] ASoC: mxs-saif: " Shawn Guo
2011-12-20 11:55   ` Mark Brown
2011-12-20 13:49   ` Marek Vasut
2011-12-20 12:00 ` [PATCH 11/12] clk: add config option HAVE_CLK_PREPARE into Kconfig Shawn Guo
2011-12-20 12:00 ` [PATCH 12/12] arm/mxs: select HAVE_CLK_PREPARE for clock Shawn Guo
2011-12-20 13:43 ` [PATCH 0/12] Add clk_prepare/clk_unprepare for mxs clock api Marek Vasut
2011-12-20 14:05   ` Shawn Guo
2011-12-20 13:59     ` Marek Vasut
2011-12-20 14:21       ` 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=201112201444.40509.marek.vasut@gmail.com \
    --to=marek.vasut@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).