* [PATCH] sh: clock-cpg div4 set_rate() shift fix
@ 2010-02-19 9:12 Magnus Damm
2010-02-22 10:15 ` Paul Mundt
0 siblings, 1 reply; 2+ messages in thread
From: Magnus Damm @ 2010-02-19 9:12 UTC (permalink / raw)
To: linux-sh
From: Magnus Damm <damm@opensource.se>
Make sure the div4 bitfield is shifted according
to the enable_bit value in sh_clk_div4_set_rate().
Signed-off-by: Magnus Damm <damm@opensource.se>
---
arch/sh/kernel/cpu/clock-cpg.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- 0001/arch/sh/kernel/cpu/clock-cpg.c
+++ work/arch/sh/kernel/cpu/clock-cpg.c 2010-02-19 16:21:09.000000000 +0900
@@ -192,8 +192,8 @@ static int sh_clk_div4_set_rate(struct c
return idx;
value = __raw_readl(clk->enable_reg);
- value &= ~0xf;
- value |= idx;
+ value &= ~(0xf << clk->enable_bit);
+ value |= (idx << clk->enable_bit);
__raw_writel(value, clk->enable_reg);
return 0;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] sh: clock-cpg div4 set_rate() shift fix
2010-02-19 9:12 [PATCH] sh: clock-cpg div4 set_rate() shift fix Magnus Damm
@ 2010-02-22 10:15 ` Paul Mundt
0 siblings, 0 replies; 2+ messages in thread
From: Paul Mundt @ 2010-02-22 10:15 UTC (permalink / raw)
To: linux-sh
On Fri, Feb 19, 2010 at 06:12:00PM +0900, Magnus Damm wrote:
> Make sure the div4 bitfield is shifted according
> to the enable_bit value in sh_clk_div4_set_rate().
On Fri, Feb 19, 2010 at 06:22:25PM +0900, Magnus Damm wrote:
> This patch introduces struct clk_div4_table. The structure
> will be used to keep div4 specific data, and is with this
> patch replacing the struct clk_div_mult_table pointer arg
> used by the sh_clk_div4_register() functions.
On Fri, Feb 19, 2010 at 06:26:56PM +0900, Magnus Damm wrote:
> This patch adds a ->kick() callback to clk_div4_table
> and ties it into sh_clk_div4_set_rate(). A sh7724
> specific kick function is also added that updates the
> KICK bit whenever div4 clocks in FRQCRA and FRQCRB
> have been set. Allows us to set the VPU clock.
On Fri, Feb 19, 2010 at 06:33:47PM +0900, Magnus Damm wrote:
> Update the sh7724 processor code to always enable vpu_clk.
>
> On the Ecovec board, set the vpu_clk to 166 Mhz.
>
> The 166MHz setting results in a divide-by-6 setup for
> vpu_clk and improves the VPU performance compared to the
> power-on-reset/bootloader configuration.
All applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-02-22 10:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-19 9:12 [PATCH] sh: clock-cpg div4 set_rate() shift fix Magnus Damm
2010-02-22 10:15 ` Paul Mundt
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).