From patchwork Fri Nov 9 07:31:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 1719311 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id A44C03FCDF for ; Fri, 9 Nov 2012 07:31:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752905Ab2KIHb6 (ORCPT ); Fri, 9 Nov 2012 02:31:58 -0500 Received: from kirsty.vergenet.net ([202.4.237.240]:34514 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753217Ab2KIHbx (ORCPT ); Fri, 9 Nov 2012 02:31:53 -0500 Received: from ayumi.akashicho.tokyo.vergenet.net (p4024-ipbfp1903kobeminato.hyogo.ocn.ne.jp [114.172.131.24]) by kirsty.vergenet.net (Postfix) with ESMTP id D450B266CF2; Fri, 9 Nov 2012 18:31:52 +1100 (EST) Received: by ayumi.akashicho.tokyo.vergenet.net (Postfix, from userid 7100) id 86B06EDE63E; Fri, 9 Nov 2012 16:31:50 +0900 (JST) From: Simon Horman To: Arnd Bergmann , Olof Johansson Cc: linux-sh@vger.kernel.org, arm@kernel.org, linux-arm-kernel@lists.infradead.org, Magnus Damm , Paul Mundt , Kuninori Morimoto , Simon Horman Subject: [PATCH 5/7] ARM: shmobile: use FSI driver's audio clock on armadillo800eva Date: Fri, 9 Nov 2012 16:31:44 +0900 Message-Id: <1352446306-19945-6-git-send-email-horms@verge.net.au> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1352446306-19945-1-git-send-email-horms@verge.net.au> References: <1352446306-19945-1-git-send-email-horms@verge.net.au> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org From: Kuninori Morimoto Current FSI driver can control audio clock without platform call-back functions This patch removed board-specific call-back/settings Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-armadillo800eva.c | 38 ++---------------------- 1 file changed, 3 insertions(+), 35 deletions(-) diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c index fe27d7e..3d4c0e4 100644 --- a/arch/arm/mach-shmobile/board-armadillo800eva.c +++ b/arch/arm/mach-shmobile/board-armadillo800eva.c @@ -768,32 +768,6 @@ static struct platform_device ceu0_device = { }; /* FSI */ -static int fsi_hdmi_set_rate(struct device *dev, int rate, int enable) -{ - struct clk *fsib; - int ret; - - /* it support 48KHz only */ - if (48000 != rate) - return -EINVAL; - - fsib = clk_get(dev, "ickb"); - if (IS_ERR(fsib)) - return -EINVAL; - - if (enable) { - ret = SH_FSI_ACKMD_256 | SH_FSI_BPFMD_64; - clk_enable(fsib); - } else { - ret = 0; - clk_disable(fsib); - } - - clk_put(fsib); - - return ret; -} - static struct sh_fsi_platform_info fsi_info = { /* FSI-WM8978 */ .port_a = { @@ -802,8 +776,8 @@ static struct sh_fsi_platform_info fsi_info = { /* FSI-HDMI */ .port_b = { .flags = SH_FSI_FMT_SPDIF | - SH_FSI_ENABLE_STREAM_MODE, - .set_rate = fsi_hdmi_set_rate, + SH_FSI_ENABLE_STREAM_MODE | + SH_FSI_CLK_CPG, .tx_id = SHDMA_SLAVE_FSIB_TX, } }; @@ -938,13 +912,11 @@ static void __init eva_clock_init(void) struct clk *xtal1 = clk_get(NULL, "extal1"); struct clk *usb24s = clk_get(NULL, "usb24s"); struct clk *fsibck = clk_get(NULL, "fsibck"); - struct clk *fsib = clk_get(&fsi_device.dev, "ickb"); if (IS_ERR(system) || IS_ERR(xtal1) || IS_ERR(usb24s) || - IS_ERR(fsibck) || - IS_ERR(fsib)) { + IS_ERR(fsibck)) { pr_err("armadillo800eva board clock init failed\n"); goto clock_error; } @@ -956,9 +928,7 @@ static void __init eva_clock_init(void) clk_set_parent(usb24s, system); /* FSIBCK is 12.288MHz, and it is parent of FSI-B */ - clk_set_parent(fsib, fsibck); clk_set_rate(fsibck, 12288000); - clk_set_rate(fsib, 12288000); clock_error: if (!IS_ERR(system)) @@ -969,8 +939,6 @@ clock_error: clk_put(usb24s); if (!IS_ERR(fsibck)) clk_put(fsibck); - if (!IS_ERR(fsib)) - clk_put(fsib); } /*