From patchwork Tue Jan 17 15:24:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 136492 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 90F8A1007D1 for ; Wed, 18 Jan 2012 02:26:48 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1RnAtf-0007La-Aq; Tue, 17 Jan 2012 15:24:27 +0000 Received: from mail-ee0-f49.google.com ([74.125.83.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1RnAtb-0007LM-Ud for linux-arm-kernel@lists.infradead.org; Tue, 17 Jan 2012 15:24:24 +0000 Received: by eekb15 with SMTP id b15so783447eek.36 for ; Tue, 17 Jan 2012 07:24:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=yPAyX6ncVvoDR2FTz5iIWYalw9YdLerCBMilXCV5t4Y=; b=t8B9iqP+amFzUuwrIX7K3GvnJBV856TAKyMgll4CuZZ9B+KfNrXphGgJ3WdnmJ/fxd qksW3sQe8Ey9lyZxEFCy08L8e15CPPDPqBvEPXeWaF9Lv3NU+U9tSRYcQsDE0WAugh3M jw0s2Wy2qcKRtoFMrPI4X8mrir/RjUv91l8Ek= MIME-Version: 1.0 Received: by 10.213.13.66 with SMTP id b2mr5016229eba.31.1326813862086; Tue, 17 Jan 2012 07:24:22 -0800 (PST) Received: by 10.213.113.1 with HTTP; Tue, 17 Jan 2012 07:24:21 -0800 (PST) In-Reply-To: References: <1326740477-21576-1-git-send-email-fabio.estevam@freescale.com> <201201162152.59997.marek.vasut@gmail.com> Date: Tue, 17 Jan 2012 13:24:21 -0200 Message-ID: Subject: Re: [PATCH] ARM: clock-mx28: Fix end of loop condition From: Fabio Estevam To: Marek Vasut X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (festevam[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.83.49 listed in list.dnswl.org] -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 , Wolfram Sang , kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, shawn.guo@freescale.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org On 1/16/12, Fabio Estevam wrote: > I will make more tests to confirm and post a new patch. On my tests I am always getting the BUSY bit of HW_CLKCTRL_SAIF0 as 1, no matter the timeout I add. BUSY bit is bit 29 of this register and matches the mx28 reference manual description. Looking at the Freescale kernel this BUSY bit is defined as 1 instead. If I do the change below: ,then audio can correctly work. Will clarify with Freescale team about this. I plan to also send a patch for replacing the for loops with a proper timeout mechanism as suggested by Wolfram. Regards, Fabio Estevam diff --git a/arch/arm/mach-mxs/regs-clkctrl-mx28.h b/arch/arm/mach-mxs/regs-clkctrl-mx28.h index 7d1b061..1813ff0 100644 --- a/arch/arm/mach-mxs/regs-clkctrl-mx28.h +++ b/arch/arm/mach-mxs/regs-clkctrl-mx28.h @@ -288,7 +288,7 @@ #define BP_CLKCTRL_SAIF0_CLKGATE 31 #define BM_CLKCTRL_SAIF0_CLKGATE 0x80000000 -#define BM_CLKCTRL_SAIF0_BUSY 0x20000000 +#define BM_CLKCTRL_SAIF0_BUSY 1 #define BM_CLKCTRL_SAIF0_DIV_FRAC_EN 0x00010000 #define BP_CLKCTRL_SAIF0_DIV 0 #define BM_CLKCTRL_SAIF0_DIV 0x0000FFFF @@ -299,7 +299,7 @@ #define BP_CLKCTRL_SAIF1_CLKGATE 31 #define BM_CLKCTRL_SAIF1_CLKGATE 0x80000000 -#define BM_CLKCTRL_SAIF1_BUSY 0x20000000 +#define BM_CLKCTRL_SAIF1_BUSY 1 #define BM_CLKCTRL_SAIF1_DIV_FRAC_EN 0x00010000 #define BP_CLKCTRL_SAIF1_DIV 0 #define BM_CLKCTRL_SAIF1_DIV 0x0000FFFF