From patchwork Thu Apr 25 17:28:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 2489541 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id F121D3FD85 for ; Thu, 25 Apr 2013 18:27:06 +0000 (UTC) Received: from merlin.infradead.org ([205.233.59.134]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UVQ5j-0005ad-IX; Thu, 25 Apr 2013 17:36:20 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UVPzZ-0007BE-1D; Thu, 25 Apr 2013 17:29:57 +0000 Received: from moutng.kundenserver.de ([212.227.17.9]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UVPym-00071K-4K for linux-arm-kernel@lists.infradead.org; Thu, 25 Apr 2013 17:29:10 +0000 Received: from wuerfel.lan (HSI-KBW-095-208-002-043.hsi5.kabel-badenwuerttemberg.de [95.208.2.43]) by mrelayeu.kundenserver.de (node=mrbap4) with ESMTP (Nemesis) id 0Lz2kC-1UZruZ2VAO-014FYM; Thu, 25 Apr 2013 19:29:03 +0200 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 06/21] ALSA: ali5451: use mdelay instead of large udelay constants Date: Thu, 25 Apr 2013 19:28:49 +0200 Message-Id: <1366910944-3033663-7-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1366910944-3033663-1-git-send-email-arnd@arndb.de> References: <1366910944-3033663-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:3mFDWxf5DvANutbs3AdV5k8psouQ3cX+/zYAr1+Zapc 7Sckz/4HAlsOxHmfatvmGizXUBKsPQrbmuKGbns93POqsniuO6 rUnAvzHOTYQCDeJkB/7HBBN6EWy5VXk8HGYf4snCQN3no51g7W sc0kukoqelmrkPNgnxHkgYbk/NOgZ5mS1Fm/zPx05FA6szsS8o Djb7IG3+c8FQyKphTFC+FpI5Mr8msBQkCd6Lst8T3mCAjP35LE C/xP3uIKKC243Xpu71VlL/08ss6EFTfJgWJPhbyv/f5A/0qI6Q 0juRW5RRi81kdKTHrqgFzu+wbTfNISLZmZbrt2rhHrQGqTY5CY YXGkYpgFlvwFajQYF5ugGodCDzI09Oi/d++yM3OMg X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130425_132908_493598_6321E4CF X-CRM114-Status: UNSURE ( 8.28 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.17.9 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Arnd Bergmann X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org ARM cannot handle udelay for more than 2 miliseconds, so we should use mdelay instead for those. Signed-off-by: Arnd Bergmann Cc: Takashi Iwai Cc: alsa-devel@alsa-project.org --- sound/pci/ali5451/ali5451.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c index e760af9..53754f5 100644 --- a/sound/pci/ali5451/ali5451.c +++ b/sound/pci/ali5451/ali5451.c @@ -451,10 +451,10 @@ static int snd_ali_reset_5451(struct snd_ali *codec) if (pci_dev) { pci_read_config_dword(pci_dev, 0x7c, &dwVal); pci_write_config_dword(pci_dev, 0x7c, dwVal | 0x08000000); - udelay(5000); + mdelay(5); pci_read_config_dword(pci_dev, 0x7c, &dwVal); pci_write_config_dword(pci_dev, 0x7c, dwVal & 0xf7ffffff); - udelay(5000); + mdelay(5); } pci_dev = codec->pci; @@ -463,14 +463,14 @@ static int snd_ali_reset_5451(struct snd_ali *codec) udelay(500); pci_read_config_dword(pci_dev, 0x44, &dwVal); pci_write_config_dword(pci_dev, 0x44, dwVal & 0xfffbffff); - udelay(5000); + mdelay(5); wCount = 200; while(wCount--) { wReg = snd_ali_codec_peek(codec, 0, AC97_POWERDOWN); if ((wReg & 0x000f) == 0x000f) return 0; - udelay(5000); + mdelay(5); } /* non-fatal if you have a non PM capable codec */