|
@@ -1474,13 +1474,17 @@ static int wm_adsp2_ena(struct wm_adsp *dsp)
|
|
return ret;
|
|
return ret;
|
|
|
|
|
|
/* Wait for the RAM to start, should be near instantaneous */
|
|
/* Wait for the RAM to start, should be near instantaneous */
|
|
- count = 0;
|
|
|
|
- do {
|
|
|
|
|
|
+ for (count = 0; count < 10; ++count) {
|
|
ret = regmap_read(dsp->regmap, dsp->base + ADSP2_STATUS1,
|
|
ret = regmap_read(dsp->regmap, dsp->base + ADSP2_STATUS1,
|
|
&val);
|
|
&val);
|
|
if (ret != 0)
|
|
if (ret != 0)
|
|
return ret;
|
|
return ret;
|
|
- } while (!(val & ADSP2_RAM_RDY) && ++count < 10);
|
|
|
|
|
|
+
|
|
|
|
+ if (val & ADSP2_RAM_RDY)
|
|
|
|
+ break;
|
|
|
|
+
|
|
|
|
+ msleep(1);
|
|
|
|
+ }
|
|
|
|
|
|
if (!(val & ADSP2_RAM_RDY)) {
|
|
if (!(val & ADSP2_RAM_RDY)) {
|
|
adsp_err(dsp, "Failed to start DSP RAM\n");
|
|
adsp_err(dsp, "Failed to start DSP RAM\n");
|