aboutsummaryrefslogtreecommitdiffstats
path: root/sound/arm/pxa2xx-ac97-lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/arm/pxa2xx-ac97-lib.c')
-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 7793d2a511ce..0afd1a8226fb 100644
--- a/sound/arm/pxa2xx-ac97-lib.c
+++ b/sound/arm/pxa2xx-ac97-lib.c
@@ -238,6 +238,8 @@ static inline void pxa_ac97_cold_pxa3xx(void)
238 238
239bool pxa2xx_ac97_try_warm_reset(struct snd_ac97 *ac97) 239bool pxa2xx_ac97_try_warm_reset(struct snd_ac97 *ac97)
240{ 240{
241 unsigned long gsr;
242
241#ifdef CONFIG_PXA25x 243#ifdef CONFIG_PXA25x
242 if (cpu_is_pxa25x()) 244 if (cpu_is_pxa25x())
243 pxa_ac97_warm_pxa25x(); 245 pxa_ac97_warm_pxa25x();
@@ -254,10 +256,10 @@ bool pxa2xx_ac97_try_warm_reset(struct snd_ac97 *ac97)
254 else 256 else
255#endif 257#endif
256 BUG(); 258 BUG();
257 259 gsr = GSR | gsr_bits;
258 if (!((GSR | gsr_bits) & (GSR_PCR | GSR_SCR))) { 260 if (!(gsr & (GSR_PCR | GSR_SCR))) {
259 printk(KERN_INFO "%s: warm reset timeout (GSR=%#lx)\n", 261 printk(KERN_INFO "%s: warm reset timeout (GSR=%#lx)\n",
260 __func__, gsr_bits); 262 __func__, gsr);
261 263
262 return false; 264 return false;
263 } 265 }
@@ -268,6 +270,8 @@ EXPORT_SYMBOL_GPL(pxa2xx_ac97_try_warm_reset);
268 270
269bool pxa2xx_ac97_try_cold_reset(struct snd_ac97 *ac97) 271bool pxa2xx_ac97_try_cold_reset(struct snd_ac97 *ac97)
270{ 272{
273 unsigned long gsr;
274
271#ifdef CONFIG_PXA25x 275#ifdef CONFIG_PXA25x
272 if (cpu_is_pxa25x()) 276 if (cpu_is_pxa25x())
273 pxa_ac97_cold_pxa25x(); 277 pxa_ac97_cold_pxa25x();
@@ -285,9 +289,10 @@ bool pxa2xx_ac97_try_cold_reset(struct snd_ac97 *ac97)
285#endif 289#endif
286 BUG(); 290 BUG();
287 291
288 if (!((GSR | gsr_bits) & (GSR_PCR | GSR_SCR))) { 292 gsr = GSR | gsr_bits;
293 if (!(gsr & (GSR_PCR | GSR_SCR))) {
289 printk(KERN_INFO "%s: cold reset timeout (GSR=%#lx)\n", 294 printk(KERN_INFO "%s: cold reset timeout (GSR=%#lx)\n",
290 __func__, gsr_bits); 295 __func__, gsr);
291 296
292 return false; 297 return false;
293 } 298 }