linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] sh: se/7724: Update clock of FSI to non-legacy
@ 2010-12-03  4:16 Nobuhiro Iwamatsu
  2010-12-03  4:31 ` Paul Mundt
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Nobuhiro Iwamatsu @ 2010-12-03  4:16 UTC (permalink / raw)
  To: linux-sh

Current FSI clock of ecovec uses legacy clock.
This update to non-legacy.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
---
 arch/sh/boards/mach-se/7724/setup.c |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c
index c31d228..88ea26a 100644
--- a/arch/sh/boards/mach-se/7724/setup.c
+++ b/arch/sh/boards/mach-se/7724/setup.c
@@ -288,7 +288,7 @@ static struct platform_device ceu1_device = {
  * So, we should change parent of fsi
  */
 #define FCLKACR		0xa4150008
-static void fsimck_init(struct clk *clk)
+static int fsimck_enable(struct clk *clk)
 {
 	u32 status = __raw_readl(clk->enable_reg);
 
@@ -296,10 +296,22 @@ static void fsimck_init(struct clk *clk)
 	status &= ~0x000000ff;
 	status |= 0x00000080;
 	__raw_writel(status, clk->enable_reg);
+
+	return 0;
+}
+
+static void fsimck_disable(struct clk *clk)
+{
+	u32 status = __raw_readl(clk->enable_reg);
+
+	/* use external clock */
+	status &= ~0x00000080;
+	__raw_writel(status, clk->enable_reg);
 }
 
 static struct clk_ops fsimck_clk_ops = {
-	.init = fsimck_init,
+	.enable = fsimck_enable,
+	.disable = fsimck_disable,
 };
 
 static struct clk fsimcka_clk = {
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-12-03  4:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-03  4:16 [PATCH 2/2] sh: se/7724: Update clock of FSI to non-legacy Nobuhiro Iwamatsu
2010-12-03  4:31 ` Paul Mundt
2010-12-03  4:39 ` Kuninori Morimoto
2010-12-03  4:39 ` Kuninori Morimoto
2010-12-03  4:42 ` Nobuhiro Iwamatsu
2010-12-03  4:44 ` Nobuhiro Iwamatsu
2010-12-03  4:45 ` 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).