* [PATCH] sh: mach-ecovec24: Enable SPU2 clock when boot
@ 2009-11-04 10:34 Kuninori Morimoto
2009-11-05 5:02 ` Paul Mundt
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Kuninori Morimoto @ 2009-11-04 10:34 UTC (permalink / raw)
To: linux-sh
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));
}
--
1.6.3.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] sh: mach-ecovec24: Enable SPU2 clock when boot
2009-11-04 10:34 [PATCH] sh: mach-ecovec24: Enable SPU2 clock when boot Kuninori Morimoto
@ 2009-11-05 5:02 ` Paul Mundt
2009-11-05 8:01 ` Kuninori Morimoto
2009-11-05 8:42 ` Magnus Damm
2 siblings, 0 replies; 4+ messages in thread
From: Paul Mundt @ 2009-11-05 5:02 UTC (permalink / raw)
To: linux-sh
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.
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] sh: mach-ecovec24: Enable SPU2 clock when boot
2009-11-04 10:34 [PATCH] sh: mach-ecovec24: Enable SPU2 clock when boot Kuninori Morimoto
2009-11-05 5:02 ` Paul Mundt
@ 2009-11-05 8:01 ` Kuninori Morimoto
2009-11-05 8:42 ` Magnus Damm
2 siblings, 0 replies; 4+ messages in thread
From: Kuninori Morimoto @ 2009-11-05 8:01 UTC (permalink / raw)
To: linux-sh
Dear Paul and Magnus
> This is just doing an enable on init, so it's better to just flag this in
> the CPU code. ie:
(snip)
> Although this is going to be a nuisance for power management.
I'm 100% not sure about power management.
Is spu clock operation unnecessary if there is following ?
+ .archdata = {
+ .hwblk_id = HWBLK_SPU,
+ },
If so, please throw away this patch.
Best regards
--
Kuninori Morimoto
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] sh: mach-ecovec24: Enable SPU2 clock when boot
2009-11-04 10:34 [PATCH] sh: mach-ecovec24: Enable SPU2 clock when boot Kuninori Morimoto
2009-11-05 5:02 ` Paul Mundt
2009-11-05 8:01 ` Kuninori Morimoto
@ 2009-11-05 8:42 ` Magnus Damm
2 siblings, 0 replies; 4+ messages in thread
From: Magnus Damm @ 2009-11-05 8:42 UTC (permalink / raw)
To: linux-sh
Hey Morimoto-san,
On Thu, Nov 5, 2009 at 5:01 PM, Kuninori Morimoto
<morimoto.kuninori@renesas.com> wrote:
>> This is just doing an enable on init, so it's better to just flag this in
>> the CPU code. ie:
> (snip)
>> Although this is going to be a nuisance for power management.
>
> I'm 100% not sure about power management.
> Is spu clock operation unnecessary if there is following ?
>
> + .archdata = {
> + .hwblk_id = HWBLK_SPU,
> + },
>
> If so, please throw away this patch.
No, your code is correct. And Paul has a nicer solution for the spu_clk.
At this point you need to enable the parent clock and use hwblk_id for
module stop bits.
Cheers,
/ magnus
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-11-05 8:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-04 10:34 [PATCH] sh: mach-ecovec24: Enable SPU2 clock when boot Kuninori Morimoto
2009-11-05 5:02 ` Paul Mundt
2009-11-05 8:01 ` Kuninori Morimoto
2009-11-05 8:42 ` Magnus Damm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox