From patchwork Thu May 8 08:59:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 4133871 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 48A0CBFF02 for ; Thu, 8 May 2014 08:59:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 60E81201EC for ; Thu, 8 May 2014 08:59:56 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 1EFDF20212 for ; Thu, 8 May 2014 08:59:55 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 20B742651C0; Thu, 8 May 2014 10:59:54 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 679EE2651AD; Thu, 8 May 2014 10:59:41 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 9B5E82651AD; Thu, 8 May 2014 10:59:40 +0200 (CEST) Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) by alsa0.perex.cz (Postfix) with ESMTP id 330552651BF for ; Thu, 8 May 2014 10:59:02 +0200 (CEST) Received: by mail-pa0-f43.google.com with SMTP id hz1so2521165pad.2 for ; Thu, 08 May 2014 01:59:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:message-id:from:subject:user-agent:to:cc:in-reply-to :references:mime-version:content-type; bh=aHJrTWIVif0oX+g+RUqNjTTy7yowsJz3v1ndbN4hFic=; b=ofONlK9/kqET4lssSRELgbwoNfmeZKJ1KYwhLRNSN2q9owH8qplLdTMHAzNkslD8Gv /eVeLT2LDtzIdRxtWT+ZXHD7A8CE5QsqKHnyfzXYQwcIEtFznGORqAf9szLUkwu/q/Tg DqaG1Rc5n9KPFNQMAFicewzuz3rzmIKO+39Pzbv+q5dcTnNRjAA9xDqGxfbNhBCdQCsY wnbFxVfd2/mJxeoUSfr7klKEizS9Ik/XTIVdx15/U0Jd0gSgz0EER1S7PuBGGdulNYHa wA+VDXnMX1FXBfFumq/xdPVRnoEKyBO8wdUlB+cfbxQdp0O9HR+lcL7+fi3tjo2c8kFp CRCQ== X-Received: by 10.66.119.239 with SMTP id kx15mr5193491pab.51.1399539540938; Thu, 08 May 2014 01:59:00 -0700 (PDT) Received: from remon.gmail.com (49.14.32.202.bf.2iij.net. [202.32.14.49]) by mx.google.com with ESMTPSA id pq3sm834992pbb.57.2014.05.08.01.58.59 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 08 May 2014 01:59:00 -0700 (PDT) Date: Thu, 08 May 2014 01:59:00 -0700 (PDT) Message-ID: <874n10odd9.wl%kuninori.morimoto.gx@gmail.com> From: Kuninori Morimoto User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 To: Mark Brown In-Reply-To: <8761lgodfc.wl%kuninori.morimoto.gx@renesas.com> References: <87sipg20h1.wl%kuninori.morimoto.gx@gmail.com> <87ioqc20ei.wl%kuninori.morimoto.gx@gmail.com> <20140414190327.GE25182@sirena.org.uk> <87bnv9nn19.wl%kuninori.morimoto.gx@renesas.com> <20140508052821.GY12304@sirena.org.uk> <8761lgodfc.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Cc: alsa-devel@alsa-project.org, Simon , Magnus , Kuninori Morimoto Subject: [alsa-devel] [PATCH 6/7][resend] ASoC: rsnd: remove old clock style support X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kuninori Morimoto All platform which used old style was switched to new style. R-Car sound can remove old style clock support, use device dependent clock now. Signed-off-by: Kuninori Morimoto --- sound/soc/sh/rcar/adg.c | 39 +++------------------------------------ 1 file changed, 3 insertions(+), 36 deletions(-) diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c index 69c4426..41556b2 100644 --- a/sound/soc/sh/rcar/adg.c +++ b/sound/soc/sh/rcar/adg.c @@ -397,9 +397,8 @@ int rsnd_adg_probe(struct platform_device *pdev, { struct rsnd_adg *adg; struct device *dev = rsnd_priv_to_dev(priv); - struct clk *clk, *clk_orig; + struct clk *clk; int i; - bool use_old_style = false; adg = devm_kzalloc(dev, sizeof(*adg), GFP_KERNEL); if (!adg) { @@ -407,45 +406,13 @@ int rsnd_adg_probe(struct platform_device *pdev, return -ENOMEM; } - clk_orig = devm_clk_get(dev, NULL); adg->clk[CLKA] = devm_clk_get(dev, "clk_a"); adg->clk[CLKB] = devm_clk_get(dev, "clk_b"); adg->clk[CLKC] = devm_clk_get(dev, "clk_c"); adg->clk[CLKI] = devm_clk_get(dev, "clk_i"); - /* - * It request device dependent audio clock. - * But above all clks will indicate rsnd module clock - * if platform doesn't it - */ - for_each_rsnd_clk(clk, adg, i) { - if (clk_orig == clk) { - dev_warn(dev, - "doesn't have device dependent clock, use independent clock\n"); - use_old_style = true; - break; - } - } - - /* - * note: - * these exist in order to keep compatible with - * platform which has device independent audio clock, - * but will be removed soon - */ - if (use_old_style) { - adg->clk[CLKA] = devm_clk_get(NULL, "audio_clk_a"); - adg->clk[CLKB] = devm_clk_get(NULL, "audio_clk_b"); - adg->clk[CLKC] = devm_clk_get(NULL, "audio_clk_c"); - adg->clk[CLKI] = devm_clk_get(NULL, "audio_clk_internal"); - } - - for_each_rsnd_clk(clk, adg, i) { - if (IS_ERR(clk)) { - dev_err(dev, "Audio clock failed\n"); - return -EIO; - } - } + for_each_rsnd_clk(clk, adg, i) + dev_dbg(dev, "clk %d : %p\n", i, clk); rsnd_adg_ssi_clk_init(priv, adg);