diff mbox

[1/2] sh: ecovec: Update clock of FSI to non-legacy

Message ID 1291349817-3077-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Nobuhiro Iwamatsu Dec. 3, 2010, 4:16 a.m. UTC
None
diff mbox

Patch

diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
index 2eaeb9e..1f3377d 100644
--- a/arch/sh/boards/mach-ecovec24/setup.c
+++ b/arch/sh/boards/mach-ecovec24/setup.c
@@ -725,7 +725,7 @@  static struct platform_device camera_devices[] = {
  * So, we should change parent of fsi
  */
 #define FCLKBCR		0xa415000c
-static void fsimck_init(struct clk *clk)
+static int fsimck_enable(struct clk *clk)
 {
 	u32 status = __raw_readl(clk->enable_reg);
 
@@ -734,10 +734,23 @@  static void fsimck_init(struct clk *clk)
 	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 fsimckb_clk = {