public inbox for linux-sh@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH] sh: mach-ecovec24: Enable SPU2 clock when boot
Date: Thu, 05 Nov 2009 05:02:09 +0000	[thread overview]
Message-ID: <20091105050208.GB26910@linux-sh.org> (raw)
In-Reply-To: <uocnifuik.wl%morimoto.kuninori@renesas.com>

On Wed, Nov 04, 2009 at 07:34:43PM +0900, Kuninori Morimoto wrote:
> 
> Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
> ---
>  arch/sh/boards/mach-ecovec24/setup.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
> index 2274985..d5d36fe 100644
> --- a/arch/sh/boards/mach-ecovec24/setup.c
> +++ b/arch/sh/boards/mach-ecovec24/setup.c
> @@ -535,6 +535,8 @@ extern char ecovec24_sdram_leave_end;
>  
>  static int __init arch_setup(void)
>  {
> +	struct clk *clk;
> +
>  	/* register board specific self-refresh code */
>  	sh_mobile_register_self_refresh(SUSP_SH_STANDBY | SUSP_SH_SF,
>  					&ecovec24_sdram_enter_start,
> @@ -780,6 +782,11 @@ static int __init arch_setup(void)
>  	i2c_register_board_info(1, i2c1_devices,
>  				ARRAY_SIZE(i2c1_devices));
>  
> +	/* enable SPU2 */
> +	clk = clk_get(NULL, "spu_clk");
> +	clk_enable(clk); /* start SPU2 */
> +	clk_put(clk);
> +
>  	return platform_add_devices(ecovec_devices,
>  				    ARRAY_SIZE(ecovec_devices));
>  }

This is just doing an enable on init, so it's better to just flag this in
the CPU code. ie:

diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7724.c b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
index dfe9192..9db7438 100644
--- a/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
@@ -152,7 +152,7 @@ struct clk div6_clks[] = {
 	SH_CLK_DIV6("fsia_clk", &div3_clk, FCLKACR, 0),
 	SH_CLK_DIV6("fsib_clk", &div3_clk, FCLKBCR, 0),
 	SH_CLK_DIV6("irda_clk", &div3_clk, IRDACLKCR, 0),
-	SH_CLK_DIV6("spu_clk", &div3_clk, SPUCLKCR, 0),
+	SH_CLK_DIV6("spu_clk", &div3_clk, SPUCLKCR, CLK_ENABLE_ON_INIT),
 };
 
 #define R_CLK (&r_clk)

Although this is going to be a nuisance for power management.

  reply	other threads:[~2009-11-05  5:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-04 10:34 [PATCH] sh: mach-ecovec24: Enable SPU2 clock when boot Kuninori Morimoto
2009-11-05  5:02 ` Paul Mundt [this message]
2009-11-05  8:01 ` Kuninori Morimoto
2009-11-05  8:42 ` Magnus Damm

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=20091105050208.GB26910@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=linux-sh@vger.kernel.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