From 651aef2849ce18a0e005492c400d7200e92bbc73 Mon Sep 17 00:00:00 2001 From: ScottPeterson Date: Fri, 3 Feb 2012 16:34:39 -0800 Subject: arm: tegra: hda: Improve resume time Improve the resume time of the HD Audio driver by replacing selected msleep() functions with mdelay(). msleep() return times are not deterministic. Signed-off-by: ScottPeterson Reviewed-on: http://git-master/r/86896 (cherry picked from commit eccbe7983d1b010cc60b49bfb13d041b3a0957d3) Change-Id: I261ba51e7f8414bca50076ae73473114a308645c Reviewed-on: http://git-master/r/88090 Reviewed-by: Scott Peterson Tested-by: Scott Peterson --- sound/pci/hda/hda_codec.c | 2 +- sound/pci/hda/hda_intel.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 93f979db5a2e..6e171eef07ee 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -3276,7 +3276,7 @@ void snd_hda_codec_set_power_to_all(struct hda_codec *codec, hda_nid_t fg, AC_VERB_GET_POWER_STATE, 0); if (state == power_state) break; - msleep(1); + mdelay(1); } while (time_after_eq(end_time, jiffies)); } } diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 2407913c9555..b005f550c146 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -996,22 +996,22 @@ static int azx_reset(struct azx *chip, int full_reset) count = 50; while (azx_readb(chip, GCTL) && --count) - msleep(1); + mdelay(1); /* delay for >= 100us for codec PLL to settle per spec * Rev 0.9 section 5.5.1 */ - msleep(1); + mdelay(1); /* Bring controller out of reset */ azx_writeb(chip, GCTL, azx_readb(chip, GCTL) | ICH6_GCTL_RESET); count = 50; while (!azx_readb(chip, GCTL) && --count) - msleep(1); + mdelay(1); /* Brent Chartrand said to wait >= 540us for codecs to initialize */ - msleep(1); + mdelay(1); __skip: /* check to see if controller is ready */ -- cgit v1.2.3