From patchwork Fri Dec 3 04:16:56 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nobuhiro Iwamatsu X-Patchwork-Id: 376711 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oB34GTjW018350 for ; Fri, 3 Dec 2010 04:16:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758462Ab0LCEQ7 (ORCPT ); Thu, 2 Dec 2010 23:16:59 -0500 Received: from mail-pv0-f174.google.com ([74.125.83.174]:39177 "EHLO mail-pv0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758435Ab0LCEQ7 (ORCPT ); Thu, 2 Dec 2010 23:16:59 -0500 Received: by pva4 with SMTP id 4so1379445pva.19 for ; Thu, 02 Dec 2010 20:16:58 -0800 (PST) Received: by 10.142.239.4 with SMTP id m4mr120270wfh.119.1291349818443; Thu, 02 Dec 2010 20:16:58 -0800 (PST) Received: from localhost.localdomain (49.14.32.202.bf.2iij.net [202.32.14.49]) by mx.google.com with ESMTPS id x18sm1655077wfa.23.2010.12.02.20.16.56 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 02 Dec 2010 20:16:57 -0800 (PST) From: Nobuhiro Iwamatsu To: linux-sh@vger.kernel.org Cc: lethal@linux-sh.org, Nobuhiro Iwamatsu Subject: [PATCH 1/2] sh: ecovec: Update clock of FSI to non-legacy Date: Fri, 3 Dec 2010 13:16:56 +0900 Message-Id: <1291349817-3077-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com> X-Mailer: git-send-email 1.7.2.3 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 03 Dec 2010 04:17:00 +0000 (UTC) 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 = {