From patchwork Mon Nov 15 03:11:09 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 324382 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 oAF3BcSm030823 for ; Mon, 15 Nov 2010 03:11:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932863Ab0KODLQ (ORCPT ); Sun, 14 Nov 2010 22:11:16 -0500 Received: from mail.renesas.com ([202.234.163.13]:53066 "EHLO mail05.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932789Ab0KODLN (ORCPT ); Sun, 14 Nov 2010 22:11:13 -0500 X-AuditID: ac140388-000000050000020f-8b-4ce0a4cd1b1c Received: from guardian02.idc.renesas.com ([172.20.8.201]) by mail05.idc.renesas.com (sendmail) with ESMTP id oAF3B9q9002030; Mon, 15 Nov 2010 12:11:09 +0900 (JST) Received: (from root@localhost) by guardian02.idc.renesas.com with id oAF3BAx3013790; Mon, 15 Nov 2010 12:11:10 +0900 (JST) Received: from mta02.idc.renesas.com (localhost [127.0.0.1]) by mta02.idc.renesas.com with ESMTP id oAF3BBNS015680; Mon, 15 Nov 2010 12:11:11 +0900 (JST) Received: from PG10870.renesas.com ([172.30.8.159]) by ims05.idc.renesas.com (Sendmail) with ESMTPA id <0LBW00CXVOUL9Y@ims05.idc.renesas.com>; Mon, 15 Nov 2010 12:11:09 +0900 (JST) Date: Mon, 15 Nov 2010 12:11:09 +0900 (JST) Date-warning: Date header was inserted by ims05.idc.renesas.com From: Kuninori Morimoto Subject: [PATCH] ARM: mach-shmobile: ap4evb: add fsib 44100Hz rate To: Paul Mundt Cc: Linux-SH , matsubara (igel), kitamura (igel), sim (RSO), TAKEI Mitsuharu Message-id: MIME-version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-type: text/plain; charset=US-ASCII User-Agent: SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-2022-JP-2?B?U2Fuag==?= =?ISO-2022-JP-2?B?GyQoRCtXGyhC?=) APEL/10.6 Emacs/23.2 (i386-mingw-nt5.1.2600) MULE/6.0 (HANACHIRUSATO) X-Brightmail-Tracker: AAAAAA== 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]); Mon, 15 Nov 2010 03:11:38 +0000 (UTC) diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index 63c2fca..5c14c73 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c @@ -582,7 +582,14 @@ static int fsi_set_rate(int is_porta, int rate) if (IS_ERR(fsib_clk)) return -EINVAL; + while (fdiv_clk->usecount) + clk_disable(fdiv_clk); + switch (rate) { + case 44100: + clk_set_rate(fsib_clk, clk_round_rate(fsib_clk, 11283000)); + ret = SH_FSI_ACKMD_256 | SH_FSI_BPFMD_64; + break; case 48000: clk_set_rate(fsib_clk, clk_round_rate(fsib_clk, 85428000)); clk_set_rate(fdiv_clk, clk_round_rate(fdiv_clk, 12204000));