diff options
Diffstat (limited to 'sound/arm/pxa2xx-ac97-lib.c')
-rw-r--r-- | sound/arm/pxa2xx-ac97-lib.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/arm/pxa2xx-ac97-lib.c b/sound/arm/pxa2xx-ac97-lib.c index 6fc0ae90e5b1..1ecd0a66ecd3 100644 --- a/sound/arm/pxa2xx-ac97-lib.c +++ b/sound/arm/pxa2xx-ac97-lib.c | |||
@@ -148,6 +148,8 @@ static inline void pxa_ac97_warm_pxa27x(void) | |||
148 | 148 | ||
149 | static inline void pxa_ac97_cold_pxa27x(void) | 149 | static inline void pxa_ac97_cold_pxa27x(void) |
150 | { | 150 | { |
151 | unsigned int timeout; | ||
152 | |||
151 | GCR &= GCR_COLD_RST; /* clear everything but nCRST */ | 153 | GCR &= GCR_COLD_RST; /* clear everything but nCRST */ |
152 | GCR &= ~GCR_COLD_RST; /* then assert nCRST */ | 154 | GCR &= ~GCR_COLD_RST; /* then assert nCRST */ |
153 | 155 | ||
@@ -157,8 +159,10 @@ static inline void pxa_ac97_cold_pxa27x(void) | |||
157 | clk_enable(ac97conf_clk); | 159 | clk_enable(ac97conf_clk); |
158 | udelay(5); | 160 | udelay(5); |
159 | clk_disable(ac97conf_clk); | 161 | clk_disable(ac97conf_clk); |
160 | GCR = GCR_COLD_RST; | 162 | GCR = GCR_COLD_RST | GCR_WARM_RST; |
161 | udelay(50); | 163 | timeout = 100; /* wait for the codec-ready bit to be set */ |
164 | while (!((GSR | gsr_bits) & (GSR_PCR | GSR_SCR)) && timeout--) | ||
165 | mdelay(1); | ||
162 | } | 166 | } |
163 | #endif | 167 | #endif |
164 | 168 | ||