remoteproc: stm32: update error management in stm32_copro_start
The coprocessor is running as soon as the hold boot is de-asserted. So indicate this running state and save the resource table even if the protective assert, to avoid autonomous reboot, is failed. This error case should never occurs. Cc: Fabien DESSENNE <fabien.dessenne@st.com> Cc: Arnaud POULIQUEN <arnaud.pouliquen@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
This commit is contained in:
@@ -139,19 +139,18 @@ static int stm32_copro_start(struct udevice *dev)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Once copro running, reset hold boot flag to avoid copro
|
* Once copro running, reset hold boot flag to avoid copro
|
||||||
* rebooting autonomously
|
* rebooting autonomously (error should never occur)
|
||||||
*/
|
*/
|
||||||
ret = reset_assert(&priv->hold_boot);
|
ret = reset_assert(&priv->hold_boot);
|
||||||
if (ret)
|
if (ret)
|
||||||
dev_err(dev, "Unable to assert hold boot (ret=%d)\n", ret);
|
dev_err(dev, "Unable to assert hold boot (ret=%d)\n", ret);
|
||||||
|
|
||||||
writel(ret ? TAMP_COPRO_STATE_OFF : TAMP_COPRO_STATE_CRUN,
|
/* indicates that copro is running */
|
||||||
TAMP_COPRO_STATE);
|
writel(TAMP_COPRO_STATE_CRUN, TAMP_COPRO_STATE);
|
||||||
if (!ret)
|
/* Store rsc_address in bkp register */
|
||||||
/* Store rsc_address in bkp register */
|
writel(priv->rsc_table_addr, TAMP_COPRO_RSC_TBL_ADDRESS);
|
||||||
writel(priv->rsc_table_addr, TAMP_COPRO_RSC_TBL_ADDRESS);
|
|
||||||
|
|
||||||
return ret;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user