public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Antipov <dmitry.antipov@linaro.org>
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()
Date: Wed, 21 Dec 2011 11:00:54 +0400	[thread overview]
Message-ID: <4EF18426.3040805@linaro.org> (raw)

 From e4db974edb5c46360465462518a88b83f1bdedf6 Mon Sep 17 00:00:00 2001
From: Dmitry Antipov <dmitry.antipov@linaro.org>
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 */
-- 
1.7.7.4


             reply	other threads:[~2011-12-21  7:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-21  7:00 Dmitry Antipov [this message]
2012-01-03 23:58 ` [PATCH] omap: use usleep_range() instead of mdelay()/udelay() Kevin Hilman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EF18426.3040805@linaro.org \
    --to=dmitry.antipov@linaro.org \
    --cc=linaro-dev@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=patches@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox