pxa2xx-ac97: fix displaying GSR after reset timeout
the variable gsr_bit is set in isr. It is however set to 0 and interrupts are disabled prior to reset. Hence it doesn't make a lot of sense to show the content of gsr_bit in case of a reset timeout. Signed-off-by: Luotao Fu <l.fu@pengutronix.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
a4d11fe50c
commit
057de50c0d
@ -239,6 +239,8 @@ static inline void pxa_ac97_cold_pxa3xx(void)
|
|||||||
|
|
||||||
bool pxa2xx_ac97_try_warm_reset(struct snd_ac97 *ac97)
|
bool pxa2xx_ac97_try_warm_reset(struct snd_ac97 *ac97)
|
||||||
{
|
{
|
||||||
|
unsigned long gsr;
|
||||||
|
|
||||||
#ifdef CONFIG_PXA25x
|
#ifdef CONFIG_PXA25x
|
||||||
if (cpu_is_pxa25x())
|
if (cpu_is_pxa25x())
|
||||||
pxa_ac97_warm_pxa25x();
|
pxa_ac97_warm_pxa25x();
|
||||||
@ -255,10 +257,10 @@ bool pxa2xx_ac97_try_warm_reset(struct snd_ac97 *ac97)
|
|||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
BUG();
|
BUG();
|
||||||
|
gsr = GSR | gsr_bits;
|
||||||
if (!((GSR | gsr_bits) & (GSR_PCR | GSR_SCR))) {
|
if (!(gsr & (GSR_PCR | GSR_SCR))) {
|
||||||
printk(KERN_INFO "%s: warm reset timeout (GSR=%#lx)\n",
|
printk(KERN_INFO "%s: warm reset timeout (GSR=%#lx)\n",
|
||||||
__func__, gsr_bits);
|
__func__, gsr);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -269,6 +271,8 @@ EXPORT_SYMBOL_GPL(pxa2xx_ac97_try_warm_reset);
|
|||||||
|
|
||||||
bool pxa2xx_ac97_try_cold_reset(struct snd_ac97 *ac97)
|
bool pxa2xx_ac97_try_cold_reset(struct snd_ac97 *ac97)
|
||||||
{
|
{
|
||||||
|
unsigned long gsr;
|
||||||
|
|
||||||
#ifdef CONFIG_PXA25x
|
#ifdef CONFIG_PXA25x
|
||||||
if (cpu_is_pxa25x())
|
if (cpu_is_pxa25x())
|
||||||
pxa_ac97_cold_pxa25x();
|
pxa_ac97_cold_pxa25x();
|
||||||
@ -286,9 +290,10 @@ bool pxa2xx_ac97_try_cold_reset(struct snd_ac97 *ac97)
|
|||||||
#endif
|
#endif
|
||||||
BUG();
|
BUG();
|
||||||
|
|
||||||
if (!((GSR | gsr_bits) & (GSR_PCR | GSR_SCR))) {
|
gsr = GSR | gsr_bits;
|
||||||
|
if (!(gsr & (GSR_PCR | GSR_SCR))) {
|
||||||
printk(KERN_INFO "%s: cold reset timeout (GSR=%#lx)\n",
|
printk(KERN_INFO "%s: cold reset timeout (GSR=%#lx)\n",
|
||||||
__func__, gsr_bits);
|
__func__, gsr);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user