Remove the boot_done counter variable and check the wm0010 state
variable instead.
Signed-off-by: Scott Ling <scott.ling@wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
enum wm0010_state state;
bool boot_failed;
- int boot_done;
bool ready;
bool pll_running;
int max_spi_freq;
break;
case 0x55555555:
- if (wm0010->boot_done == 0)
+ if (wm0010->state < WM0010_STAGE2)
break;
dev_err(codec->dev,
"%d: ROM bootloader running in stage 2\n", i);
break;
}
- wm0010->boot_done++;
if (xfer->done)
complete(xfer->done);
}
rec = (const struct dfw_binrec *)fw->data;
offset = 0;
- wm0010->boot_done = 0;
wm0010->boot_failed = false;
BUG_ON(!list_empty(&xfer_list));
init_completion(&done);