Re: [PATCH v2 2/2] mfd: madera: Wait for BOOT_DONE before reading device ID

From: Charles Keepax
Date: Tue Oct 02 2018 - 06:56:08 EST


On Tue, Oct 02, 2018 at 11:41:34AM +0100, Richard Fitzgerald wrote:
> It isn't safe to read the device ID in the SOFTWARE_RESET
> register until the silicon boot sequence has completed. This
> patch rearranges the code to wait until BOOT_DONE is set.
>
> If we don't have a hard reset line we want to defer writing a
> soft reset command until we have identified the silicon as
> something we recognize. As the BOOT_DONE bit is sticky it is
> safe to wait for it without issuing a soft reset first, because
> the most recent power-up will have caused a boot sequence and
> set the bit. Note that the boot sequence is not the same as a
> reset so we still have to soft reset to get the codec into a
> known state.
>
> Signed-off-by: Stuart Henderson <stuarth@xxxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Richard Fitzgerald <rf@xxxxxxxxxxxxxxxxxxxxx>
> ---

Reviewed-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>

Thanks,
Charles