diff options
author | Wan ZongShun <mcuos.com@gmail.com> | 2010-06-02 01:57:01 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-06-02 06:47:06 -0400 |
commit | 08a0b717578ab03db99367e69bfe6a4a71918e2c (patch) | |
tree | 5801b936586e3878cc79aca18a105a3220279793 /sound/soc/nuc900 | |
parent | 0dc3b44202fe7e7f43d6c687904ca1a04a0afb43 (diff) |
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>
Diffstat (limited to 'sound/soc/nuc900')
-rw-r--r-- | sound/soc/nuc900/nuc900-ac97.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/sound/soc/nuc900/nuc900-ac97.c b/sound/soc/nuc900/nuc900-ac97.c index b6e42c7eb9a3..caa7c901bc2e 100644 --- a/sound/soc/nuc900/nuc900-ac97.c +++ b/sound/soc/nuc900/nuc900-ac97.c | |||
@@ -147,7 +147,7 @@ static void nuc900_ac97_warm_reset(struct snd_ac97 *ac97) | |||
147 | val |= AC_W_RES; | 147 | val |= AC_W_RES; |
148 | AUDIO_WRITE(nuc900_audio->mmio + ACTL_ACCON, val); | 148 | AUDIO_WRITE(nuc900_audio->mmio + ACTL_ACCON, val); |
149 | 149 | ||
150 | udelay(1000); | 150 | udelay(100); |
151 | 151 | ||
152 | val = nuc900_checkready(); | 152 | val = nuc900_checkready(); |
153 | if (!!val) | 153 | if (!!val) |
@@ -168,40 +168,30 @@ static void nuc900_ac97_cold_reset(struct snd_ac97 *ac97) | |||
168 | val |= ACTL_RESET_BIT; | 168 | val |= ACTL_RESET_BIT; |
169 | AUDIO_WRITE(nuc900_audio->mmio + ACTL_RESET, val); | 169 | AUDIO_WRITE(nuc900_audio->mmio + ACTL_RESET, val); |
170 | 170 | ||
171 | udelay(1000); | ||
172 | |||
173 | val = AUDIO_READ(nuc900_audio->mmio + ACTL_RESET); | 171 | val = AUDIO_READ(nuc900_audio->mmio + ACTL_RESET); |
174 | val &= (~ACTL_RESET_BIT); | 172 | val &= (~ACTL_RESET_BIT); |
175 | AUDIO_WRITE(nuc900_audio->mmio + ACTL_RESET, val); | 173 | AUDIO_WRITE(nuc900_audio->mmio + ACTL_RESET, val); |
176 | 174 | ||
177 | udelay(1000); | ||
178 | |||
179 | /* reset AC-link interface */ | 175 | /* reset AC-link interface */ |
180 | 176 | ||
181 | val = AUDIO_READ(nuc900_audio->mmio + ACTL_RESET); | 177 | val = AUDIO_READ(nuc900_audio->mmio + ACTL_RESET); |
182 | val |= AC_RESET; | 178 | val |= AC_RESET; |
183 | AUDIO_WRITE(nuc900_audio->mmio + ACTL_RESET, val); | 179 | AUDIO_WRITE(nuc900_audio->mmio + ACTL_RESET, val); |
184 | 180 | ||
185 | udelay(1000); | ||
186 | |||
187 | val = AUDIO_READ(nuc900_audio->mmio + ACTL_RESET); | 181 | val = AUDIO_READ(nuc900_audio->mmio + ACTL_RESET); |
188 | val &= ~AC_RESET; | 182 | val &= ~AC_RESET; |
189 | AUDIO_WRITE(nuc900_audio->mmio + ACTL_RESET, val); | 183 | AUDIO_WRITE(nuc900_audio->mmio + ACTL_RESET, val); |
190 | 184 | ||
191 | udelay(1000); | ||
192 | |||
193 | /* cold reset AC 97 */ | 185 | /* cold reset AC 97 */ |
194 | val = AUDIO_READ(nuc900_audio->mmio + ACTL_ACCON); | 186 | val = AUDIO_READ(nuc900_audio->mmio + ACTL_ACCON); |
195 | val |= AC_C_RES; | 187 | val |= AC_C_RES; |
196 | AUDIO_WRITE(nuc900_audio->mmio + ACTL_ACCON, val); | 188 | AUDIO_WRITE(nuc900_audio->mmio + ACTL_ACCON, val); |
197 | 189 | ||
198 | udelay(1000); | ||
199 | |||
200 | val = AUDIO_READ(nuc900_audio->mmio + ACTL_ACCON); | 190 | val = AUDIO_READ(nuc900_audio->mmio + ACTL_ACCON); |
201 | val &= (~AC_C_RES); | 191 | val &= (~AC_C_RES); |
202 | AUDIO_WRITE(nuc900_audio->mmio + ACTL_ACCON, val); | 192 | AUDIO_WRITE(nuc900_audio->mmio + ACTL_ACCON, val); |
203 | 193 | ||
204 | udelay(1000); | 194 | udelay(100); |
205 | 195 | ||
206 | mutex_unlock(&ac97_mutex); | 196 | mutex_unlock(&ac97_mutex); |
207 | 197 | ||