/* stm32_copro_load() - Loadup the STM32 remote processor @dev: corresponding STM32 remote processor device @addr: Address in memory where image is stored @size: Size in bytes of the image  */
static int stm32_copro_load(struct udevice *dev, ulong addr, ulong size)
/* stm32_copro_load() - Loadup the STM32 remote processor @dev: corresponding STM32 remote processor device @addr: Address in memory where image is stored @size: Size in bytes of the image  */
static int stm32_copro_load(struct udevice *dev, ulong addr, ulong size)
{
	struct stm32_copro_privdata *priv;
	ulong rsc_table_size;
	int ret;
	priv = dev_get_priv(dev);
	ret = stm32_copro_set_hold_boot(dev, true);
	if (ret)
		return ret;
	ret = reset_assert(&priv->reset_ctl);
	if (ret) {
		dev_err(dev, "Unable to assert reset line (ret=%d)\n", ret);
		return ret;
	}
	if (rproc_elf32_load_rsc_table(dev, addr, size, &priv->rsc_table_addr,
				       &rsc_table_size)) {
		priv->rsc_table_addr = 0;
		dev_warn(dev, "No valid resource table for this firmware\n");
	}
	return rproc_elf32_load_image(dev, addr, size);
}