From patchwork Wed Dec 21 07:00:54 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Antipov X-Patchwork-Id: 5920 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 01684242F7 for ; Wed, 21 Dec 2011 07:00:19 +0000 (UTC) Received: from mail-ey0-f180.google.com (mail-ey0-f180.google.com [209.85.215.180]) by fiordland.canonical.com (Postfix) with ESMTP id E0A23A1832C for ; Wed, 21 Dec 2011 07:00:19 +0000 (UTC) Received: by eaac11 with SMTP id c11so4239742eaa.11 for ; Tue, 20 Dec 2011 23:00:19 -0800 (PST) Received: by 10.204.133.207 with SMTP id g15mr1729972bkt.17.1324450819653; Tue, 20 Dec 2011 23:00:19 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.205.82.144 with SMTP id ac16cs32036bkc; Tue, 20 Dec 2011 23:00:19 -0800 (PST) Received: by 10.180.20.18 with SMTP id j18mr11211989wie.20.1324450818341; Tue, 20 Dec 2011 23:00:18 -0800 (PST) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx.google.com with ESMTPS id a21si2259952wed.141.2011.12.20.23.00.18 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Dec 2011 23:00:18 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of dmitry.antipov@linaro.org) client-ip=74.125.82.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of dmitry.antipov@linaro.org) smtp.mail=dmitry.antipov@linaro.org Received: by wgbdr11 with SMTP id dr11so13710745wgb.31 for ; Tue, 20 Dec 2011 23:00:18 -0800 (PST) Received: by 10.216.134.149 with SMTP id s21mr2824279wei.41.1324450818156; Tue, 20 Dec 2011 23:00:18 -0800 (PST) Received: from [192.168.0.171] ([78.153.153.8]) by mx.google.com with ESMTPS id eg7sm11093940wib.8.2011.12.20.23.00.17 (version=SSLv3 cipher=OTHER); Tue, 20 Dec 2011 23:00:17 -0800 (PST) Message-ID: <4EF18426.3040805@linaro.org> Date: Wed, 21 Dec 2011 11:00:54 +0400 From: Dmitry Antipov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 MIME-Version: 1.0 To: linaro-dev@lists.linaro.org CC: patches@linaro.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] omap: use usleep_range() instead of mdelay()/udelay() >From e4db974edb5c46360465462518a88b83f1bdedf6 Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Wed, 21 Dec 2011 10:57:08 +0400 Subject: [PATCH] omap: use usleep_range() instead of mdelay()/udelay() --- arch/arm/mach-omap2/omap_phy_internal.c | 2 +- arch/arm/mach-omap2/vc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-omap2/omap_phy_internal.c b/arch/arm/mach-omap2/omap_phy_internal.c index 58775e3..e5dff64 100644 --- a/arch/arm/mach-omap2/omap_phy_internal.c +++ b/arch/arm/mach-omap2/omap_phy_internal.c @@ -145,7 +145,7 @@ int omap4430_phy_suspend(struct device *dev, int suspend) /* power on the phy */ if (__raw_readl(ctrl_base + CONTROL_DEV_CONF) & PHY_PD) { __raw_writel(~PHY_PD, ctrl_base + CONTROL_DEV_CONF); - mdelay(200); + usleep_range(200000, 201000); } /* restore the context */ diff --git a/arch/arm/mach-omap2/vc.c b/arch/arm/mach-omap2/vc.c index 031d116..57f44d5 100644 --- a/arch/arm/mach-omap2/vc.c +++ b/arch/arm/mach-omap2/vc.c @@ -151,7 +151,7 @@ void omap_vc_post_scale(struct voltagedomain *voltdm, /* SMPS slew rate / step size. 2us added as buffer. */ smps_delay = ((smps_steps * voltdm->pmic->step_size) / voltdm->pmic->slew_rate) + 2; - udelay(smps_delay); + usleep_range(smps_delay, smps_delay + 10); } /* vc_bypass_scale - VC bypass method of voltage scaling */