From: Magnus Damm <magnus.damm@gmail.com>
To: linux-sh@vger.kernel.org
Subject: [PATCH] sh: clock-cpg div4 set_rate() shift fix
Date: Fri, 19 Feb 2010 09:12:00 +0000 [thread overview]
Message-ID: <20100219091200.472.86301.sendpatchset@t400s> (raw)
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;
next reply other threads:[~2010-02-19 9:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-19 9:12 Magnus Damm [this message]
2010-02-22 10:15 ` [PATCH] sh: clock-cpg div4 set_rate() shift fix Paul Mundt
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=20100219091200.472.86301.sendpatchset@t400s \
--to=magnus.damm@gmail.com \
--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 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.