From patchwork Fri Dec 3 05:37:53 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nobuhiro Iwamatsu X-Patchwork-Id: 376761 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 oB35bwkW028324 for ; Fri, 3 Dec 2010 05:37:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752650Ab0LCFh6 (ORCPT ); Fri, 3 Dec 2010 00:37:58 -0500 Received: from mail-px0-f174.google.com ([209.85.212.174]:60600 "EHLO mail-px0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752169Ab0LCFh6 (ORCPT ); Fri, 3 Dec 2010 00:37:58 -0500 Received: by pxi15 with SMTP id 15so1388877pxi.19 for ; Thu, 02 Dec 2010 21:37:57 -0800 (PST) Received: by 10.142.225.20 with SMTP id x20mr1411667wfg.83.1291354677657; Thu, 02 Dec 2010 21:37:57 -0800 (PST) Received: from localhost.localdomain (49.14.32.202.bf.2iij.net [202.32.14.49]) by mx.google.com with ESMTPS id b11sm1739743wff.9.2010.12.02.21.37.56 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 02 Dec 2010 21:37:57 -0800 (PST) From: Nobuhiro Iwamatsu To: linux-sh@vger.kernel.org Cc: lethal@linux-sh.org, Nobuhiro Iwamatsu Subject: [PATCH] sh: se/7724: Update clock framework of FSI clock to non-legacy Date: Fri, 3 Dec 2010 14:37:53 +0900 Message-Id: <1291354674-13100-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 05:37:59 +0000 (UTC) diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c index 6735305..1486ab7 100644 --- a/arch/sh/boards/mach-se/7724/setup.c +++ b/arch/sh/boards/mach-se/7724/setup.c @@ -283,31 +283,6 @@ static struct platform_device ceu1_device = { }; /* FSI */ -/* - * FSI-A use external clock which came from ak464x. - * So, we should change parent of fsi - */ -#define FCLKACR 0xa4150008 -static void fsimck_init(struct clk *clk) -{ - u32 status = __raw_readl(clk->enable_reg); - - /* use external clock */ - status &= ~0x000000ff; - status |= 0x00000080; - __raw_writel(status, clk->enable_reg); -} - -static struct clk_ops fsimck_clk_ops = { - .init = fsimck_init, -}; - -static struct clk fsimcka_clk = { - .ops = &fsimck_clk_ops, - .enable_reg = (void __iomem *)FCLKACR, - .rate = 0, /* unknown */ -}; - /* change J20, J21, J22 pin to 1-2 connection to use slave mode */ static struct sh_fsi_platform_info fsi_info = { .porta_flags = SH_FSI_BRS_INV | @@ -879,10 +854,10 @@ static int __init devices_setup(void) /* change parent of FSI A */ clk = clk_get(NULL, "fsia_clk"); if (!IS_ERR(clk)) { - clk_register(&fsimcka_clk); - clk_set_parent(clk, &fsimcka_clk); - clk_set_rate(clk, 11000); - clk_set_rate(&fsimcka_clk, 11000); + /* 48kHz dummy clock was used to make sure 1/1 divide */ + clk_set_rate(&sh7724_fsimcka_clk, 48000); + clk_set_parent(clk, &sh7724_fsimcka_clk); + clk_set_rate(clk, 48000); clk_put(clk); }