From patchwork Fri Jun 7 22:07:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 249857 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:770:15f::2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 3A5D92C008E for ; Sat, 8 Jun 2013 08:09:47 +1000 (EST) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ul4qG-0004GC-Tu; Fri, 07 Jun 2013 22:09:05 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ul4px-0000zb-M1; Fri, 07 Jun 2013 22:08:45 +0000 Received: from mail-gg0-x22d.google.com ([2607:f8b0:4002:c02::22d]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ul4pu-0000yh-Mj for linux-arm-kernel@lists.infradead.org; Fri, 07 Jun 2013 22:08:43 +0000 Received: by mail-gg0-f173.google.com with SMTP id k3so171607ggn.18 for ; Fri, 07 Jun 2013 15:08:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=LYzS/PcrAzRqZE5c7gRqZKt8Zn06SUKb1r/rgjq1E7o=; b=YGaQczrohXaQOBvaf2JGr9lXcla+ceB4zyICbhnWw8qGBd9YP3Ik6XRPHKXI8W7QNA mFxvVY2IuaoTiszkUptqkWtlcFU2zHurZq4N+5nvQhpr2D8erWF2oqaQvPQhwOSdS5zb JNE4z2gl4Gc4Fuwsvq5gFTq9ozOupfw1xE6CiB7SXnQdGLOe3fzEhBZzAeBDfQAhA8Ki dl8tWs8smdbVXftQKh4cdtx3Y1+LZfQENJ2p5q5antV1/DqmuRq6mg71hLtCrQDySJuO FqkD5dyXfCZZgkMX3WusVo/ja44AhIFsID+U2begkatrA6+r2XDloCWlVrdcuscvWmoC NUdg== X-Received: by 10.236.145.136 with SMTP id p8mr346569yhj.74.1370642900975; Fri, 07 Jun 2013 15:08:20 -0700 (PDT) Received: from localhost.localdomain ([187.106.36.101]) by mx.google.com with ESMTPSA id z65sm1153622yhc.9.2013.06.07.15.08.19 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 07 Jun 2013 15:08:20 -0700 (PDT) From: Fabio Estevam To: shawn.guo@linaro.org Subject: [PATCH] ARM: mach-imx6q: Enable the codec clock earlier Date: Fri, 7 Jun 2013 19:07:50 -0300 Message-Id: <1370642870-8051-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.8.1.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130607_180842_813698_580D0A88 X-CRM114-Status: GOOD ( 11.50 ) X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (festevam[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Fabio Estevam , broonie@kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org From: Fabio Estevam In order sgtl5000 driver to probe successfully, we need to read its ID via I2C ,which requires that MCLK is driven prior to the I2C access. Otherwise we get the following probe error: sgtl5000: probe of 0-000a failed with error -5 imx-sgtl5000 sound.13: ASoC: CODEC (null) not registered imx-sgtl5000 sound.13: snd_soc_register_card failed (-517) platform sound.13: Driver imx-sgtl5000 requests probe deferral Turn on MCLK sooner so that the probe can succeed. Signed-off-by: Fabio Estevam --- This issue is seen on linux-next tree arch/arm/mach-imx/mach-imx6q.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 045e5e3..034f4d2 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c @@ -118,6 +118,7 @@ static void __init imx6q_sabrelite_cko1_setup(void) { struct clk *cko1_sel, *ahb, *cko1; unsigned long rate; + int ret; cko1_sel = clk_get_sys(NULL, "cko1_sel"); ahb = clk_get_sys(NULL, "ahb"); @@ -129,6 +130,9 @@ static void __init imx6q_sabrelite_cko1_setup(void) clk_set_parent(cko1_sel, ahb); rate = clk_round_rate(cko1, 16000000); clk_set_rate(cko1, rate); + ret = clk_prepare_enable(cko1); + if (ret) + pr_err("enabling clko1 failed: %d", ret); put_clk: if (!IS_ERR(cko1_sel)) clk_put(cko1_sel);