aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/arm/pxa2xx-ac97-lib.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/sound/arm/pxa2xx-ac97-lib.c b/sound/arm/pxa2xx-ac97-lib.c
index 2e6355f4cbb9..71bef45e9d31 100644
--- a/sound/arm/pxa2xx-ac97-lib.c
+++ b/sound/arm/pxa2xx-ac97-lib.c
@@ -239,6 +239,8 @@ static inline void pxa_ac97_cold_pxa3xx(void)
239 239
240bool pxa2xx_ac97_try_warm_reset(struct snd_ac97 *ac97) 240bool pxa2xx_ac97_try_warm_reset(struct snd_ac97 *ac97)
241{ 241{
242 unsigned long gsr;
243
242#ifdef CONFIG_PXA25x 244#ifdef CONFIG_PXA25x
243 if (cpu_is_pxa25x()) 245 if (cpu_is_pxa25x())
244 pxa_ac97_warm_pxa25x(); 246 pxa_ac97_warm_pxa25x();
@@ -255,10 +257,10 @@ bool pxa2xx_ac97_try_warm_reset(struct snd_ac97 *ac97)
255 else 257 else
256#endif 258#endif
257 BUG(); 259 BUG();
258 260 gsr = GSR | gsr_bits;
259 if (!((GSR | gsr_bits) & (GSR_PCR | GSR_SCR))) { 261 if (!(gsr & (GSR_PCR | GSR_SCR))) {
260 printk(KERN_INFO "%s: warm reset timeout (GSR=%#lx)\n", 262 printk(KERN_INFO "%s: warm reset timeout (GSR=%#lx)\n",
261 __func__, gsr_bits); 263 __func__, gsr);
262 264
263 return false; 265 return false;
264 } 266 }
@@ -269,6 +271,8 @@ EXPORT_SYMBOL_GPL(pxa2xx_ac97_try_warm_reset);
269 271
270bool pxa2xx_ac97_try_cold_reset(struct snd_ac97 *ac97) 272bool pxa2xx_ac97_try_cold_reset(struct snd_ac97 *ac97)
271{ 273{
274 unsigned long gsr;
275
272#ifdef CONFIG_PXA25x 276#ifdef CONFIG_PXA25x
273 if (cpu_is_pxa25x()) 277 if (cpu_is_pxa25x())
274 pxa_ac97_cold_pxa25x(); 278 pxa_ac97_cold_pxa25x();
@@ -286,9 +290,10 @@ bool pxa2xx_ac97_try_cold_reset(struct snd_ac97 *ac97)
286#endif 290#endif
287 BUG(); 291 BUG();
288 292
289 if (!((GSR | gsr_bits) & (GSR_PCR | GSR_SCR))) { 293 gsr = GSR | gsr_bits;
294 if (!(gsr & (GSR_PCR | GSR_SCR))) {
290 printk(KERN_INFO "%s: cold reset timeout (GSR=%#lx)\n", 295 printk(KERN_INFO "%s: cold reset timeout (GSR=%#lx)\n",
291 __func__, gsr_bits); 296 __func__, gsr);
292 297
293 return false; 298 return false;
294 } 299 }