ASoC: nuc900: patch for modifing the ac97 delays to minimum

This patch is to modify the ac97 delays to minimum, all these 1000 micro
seconds delays seem over spec for the AC97 interface.

I deleted some unnecessary delays here and changed the AC97 cold and warm reset
delays from 1000us to 100us.

Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
Wan ZongShun 2010-06-02 13:57:01 +08:00 committed by Mark Brown
parent 0dc3b44202
commit 08a0b71757
1 changed files with 2 additions and 12 deletions

View File

@ -147,7 +147,7 @@ static void nuc900_ac97_warm_reset(struct snd_ac97 *ac97)
val |= AC_W_RES; val |= AC_W_RES;
AUDIO_WRITE(nuc900_audio->mmio + ACTL_ACCON, val); AUDIO_WRITE(nuc900_audio->mmio + ACTL_ACCON, val);
udelay(1000); udelay(100);
val = nuc900_checkready(); val = nuc900_checkready();
if (!!val) if (!!val)
@ -168,40 +168,30 @@ static void nuc900_ac97_cold_reset(struct snd_ac97 *ac97)
val |= ACTL_RESET_BIT; val |= ACTL_RESET_BIT;
AUDIO_WRITE(nuc900_audio->mmio + ACTL_RESET, val); AUDIO_WRITE(nuc900_audio->mmio + ACTL_RESET, val);
udelay(1000);
val = AUDIO_READ(nuc900_audio->mmio + ACTL_RESET); val = AUDIO_READ(nuc900_audio->mmio + ACTL_RESET);
val &= (~ACTL_RESET_BIT); val &= (~ACTL_RESET_BIT);
AUDIO_WRITE(nuc900_audio->mmio + ACTL_RESET, val); AUDIO_WRITE(nuc900_audio->mmio + ACTL_RESET, val);
udelay(1000);
/* reset AC-link interface */ /* reset AC-link interface */
val = AUDIO_READ(nuc900_audio->mmio + ACTL_RESET); val = AUDIO_READ(nuc900_audio->mmio + ACTL_RESET);
val |= AC_RESET; val |= AC_RESET;
AUDIO_WRITE(nuc900_audio->mmio + ACTL_RESET, val); AUDIO_WRITE(nuc900_audio->mmio + ACTL_RESET, val);
udelay(1000);
val = AUDIO_READ(nuc900_audio->mmio + ACTL_RESET); val = AUDIO_READ(nuc900_audio->mmio + ACTL_RESET);
val &= ~AC_RESET; val &= ~AC_RESET;
AUDIO_WRITE(nuc900_audio->mmio + ACTL_RESET, val); AUDIO_WRITE(nuc900_audio->mmio + ACTL_RESET, val);
udelay(1000);
/* cold reset AC 97 */ /* cold reset AC 97 */
val = AUDIO_READ(nuc900_audio->mmio + ACTL_ACCON); val = AUDIO_READ(nuc900_audio->mmio + ACTL_ACCON);
val |= AC_C_RES; val |= AC_C_RES;
AUDIO_WRITE(nuc900_audio->mmio + ACTL_ACCON, val); AUDIO_WRITE(nuc900_audio->mmio + ACTL_ACCON, val);
udelay(1000);
val = AUDIO_READ(nuc900_audio->mmio + ACTL_ACCON); val = AUDIO_READ(nuc900_audio->mmio + ACTL_ACCON);
val &= (~AC_C_RES); val &= (~AC_C_RES);
AUDIO_WRITE(nuc900_audio->mmio + ACTL_ACCON, val); AUDIO_WRITE(nuc900_audio->mmio + ACTL_ACCON, val);
udelay(1000); udelay(100);
mutex_unlock(&ac97_mutex); mutex_unlock(&ac97_mutex);