LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Kerr <jeremy.kerr@canonical.com>
To: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linuxppc-dev@lists.ozlabs.org
Subject: [RFC,PATCH 4/7 v2] arm/versatile: remove oscoff from clk_versatile
Date: Tue, 12 Jan 2010 17:58:31 +1100	[thread overview]
Message-ID: <1263279511.161599.615234274711.4.gpush@pororo> (raw)
In-Reply-To: <1263279511.160127.576969496193.0.gpush@pororo>

We only use one value for oscoff, so remove it from the struct.

Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>

---
 arch/arm/mach-versatile/clock.h |    1 -
 arch/arm/mach-versatile/core.c  |    6 +++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-versatile/clock.h b/arch/arm/mach-versatile/clock.h
index d1c8791..6ac30c5 100644
--- a/arch/arm/mach-versatile/clock.h
+++ b/arch/arm/mach-versatile/clock.h
@@ -15,7 +15,6 @@ struct clk_versatile {
 	struct clk			clk;
 	unsigned long			rate;
 	const struct icst307_params	params;
-	u32				oscoff;
 	void				(*setvco)(struct clk_versatile *,
 						  struct icst307_vco);
 };
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index b6964bc..2b670bb 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -384,13 +384,14 @@ static void versatile_oscvco_set(struct clk_versatile *clk, struct icst307_vco v
 {
 	void __iomem *sys = __io_address(VERSATILE_SYS_BASE);
 	void __iomem *sys_lock = sys + VERSATILE_SYS_LOCK_OFFSET;
+	void __iomem *sys_osc = sys + VERSATILE_SYS_OSCCLCD_OFFSET;
 	u32 val;
 
-	val = readl(sys + clk->oscoff) & ~0x7ffff;
+	val = readl(sys_osc) & ~0x7ffff;
 	val |= vco.v | (vco.r << 9) | (vco.s << 16);
 
 	writel(0xa05f, sys_lock);
-	writel(val, sys + clk->oscoff);
+	writel(val, sys_osc);
 	writel(0, sys_lock);
 }
 
@@ -406,7 +407,6 @@ static struct clk_versatile osc4_clk = {
 		.rd_min		= 1 + 2,
 		.rd_max		= 127 + 2,
 	},
-	.oscoff = VERSATILE_SYS_OSCCLCD_OFFSET,
 	.setvco = versatile_oscvco_set,
 };
 

  reply	other threads:[~2010-01-12  6:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-12  6:58 [RFC,PATCH 0/7 v2] Common struct clk implementation Jeremy Kerr
2010-01-12  6:58 ` Jeremy Kerr [this message]
2010-01-12  6:58 ` [RFC,PATCH 7/7 v2] arm/icst307: remove icst307_ps_to_vco Jeremy Kerr
2010-01-12  6:58 ` [RFC,PATCH 2/7 v2] Generic support for fixed-rate clocks Jeremy Kerr
2010-01-12  6:58 ` [RFC,PATCH 1/7 v2] Add a common struct clk Jeremy Kerr
2010-01-12  8:48   ` Francesco VIRLINZI
2010-01-12  9:01     ` Russell King - ARM Linux
2010-01-12 14:24       ` Ben Dooks
2010-01-12 14:27       ` Ben Dooks
2010-01-12 14:30   ` Ben Dooks
2010-01-12  6:58 ` [RFC,PATCH 3/7 v2] arm/versatile: use generic " Jeremy Kerr
2010-01-12 16:25   ` Russell King - ARM Linux
2010-01-25  0:35     ` Jeremy Kerr
2010-01-12  6:58 ` [RFC, PATCH 6/7 v2] arm/icst307: use common struct clk, unify realview and versatile clocks Jeremy Kerr
2010-01-12  6:58 ` [RFC,PATCH 5/7 v2] arm/realview: use generic struct clk Jeremy Kerr
2010-01-12  9:13 ` [RFC,PATCH 0/7 v2] Common struct clk implementation Russell King - ARM Linux
2010-01-13  1:17   ` Jeremy Kerr

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=1263279511.161599.615234274711.4.gpush@pororo \
    --to=jeremy.kerr@canonical.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.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