static int da8xx_rproc_remove(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct rproc *rproc = platform_get_drvdata(pdev); struct da8xx_rproc *drproc = (struct da8xx_rproc *)rproc->priv; /* * It's important to place the DSP in reset before going away, * since a subsequent insmod of this module may enable the DSP's * clock before its program/boot-address has been loaded and * before this module's probe has had a chance to reset the DSP. * Without the reset, the DSP can lockup permanently when it * begins executing garbage. */ reset_assert(dev); /* * The devm subsystem might end up releasing things before * freeing the irq, thus allowing an interrupt to sneak in while * the device is being removed. This should prevent that. */ disable_irq(drproc->irq); rproc_del(rproc); rproc_put(rproc); return 0; }
static int wkup_m3_rproc_remove(struct platform_device *pdev) { struct rproc *rproc = platform_get_drvdata(pdev); rproc_del(rproc); rproc_free(rproc); pm_runtime_put_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); return 0; }
static int zynqmp_r5_remoteproc_remove(struct platform_device *pdev) { struct zynqmp_r5_rproc_pdata *local = platform_get_drvdata(pdev); dev_info(&pdev->dev, "%s\n", __func__); rproc_del(local->rproc); rproc_put(local->rproc); dma_release_declared_memory(&pdev->dev); return 0; }
static int adsp_remove(struct platform_device *pdev) { struct qcom_adsp *adsp = platform_get_drvdata(pdev); rproc_del(adsp->rproc); qcom_remove_glink_subdev(adsp->rproc, &adsp->glink_subdev); qcom_remove_sysmon_subdev(adsp->sysmon); qcom_remove_ssr_subdev(adsp->rproc, &adsp->ssr_subdev); pm_runtime_disable(adsp->dev); rproc_free(adsp->rproc); return 0; }
static int st_rproc_remove(struct platform_device *pdev) { struct rproc *rproc = platform_get_drvdata(pdev); struct st_rproc *ddata = rproc->priv; rproc_del(rproc); clk_disable_unprepare(ddata->clk); of_reserved_mem_device_release(&pdev->dev); rproc_free(rproc); return 0; }
/** * st_slim_rproc_put() - put slim rproc resources * @slim_rproc: Pointer to the st_slim_rproc struct * * Function for calling respective _put() functions on slim_rproc resources. * */ void st_slim_rproc_put(struct st_slim_rproc *slim_rproc) { int clk; if (!slim_rproc) return; slim_clk_disable(slim_rproc); for (clk = 0; clk < ST_SLIM_MAX_CLK && slim_rproc->clks[clk]; clk++) clk_put(slim_rproc->clks[clk]); rproc_del(slim_rproc->rproc); rproc_free(slim_rproc->rproc); }
static int da8xx_rproc_remove(struct platform_device *pdev) { struct rproc *rproc = platform_get_drvdata(pdev); struct da8xx_rproc *drproc = (struct da8xx_rproc *)rproc->priv; struct device *dev = &pdev->dev; /* * The devm subsystem might end up releasing things before * freeing the irq, thus allowing an interrupt to sneak in while * the device is being removed. This should prevent that. */ disable_irq(drproc->irq); rproc_del(rproc); rproc_free(rproc); if (dev->of_node) of_reserved_mem_device_release(dev); return 0; }
/* STE modem device is unregistered */ static int sproc_drv_remove(struct platform_device *pdev) { struct ste_modem_device *mdev = container_of(pdev, struct ste_modem_device, pdev); struct sproc *sproc = mdev->drv_data; sproc_dbg(sproc, "remove ste-modem\n"); /* Reset device callback functions */ sproc->mdev->ops.setup(sproc->mdev, NULL); /* Unregister as remoteproc device */ rproc_del(sproc->rproc); dma_free_coherent(sproc->rproc->dev.parent, SPROC_FW_SIZE, sproc->fw_addr, sproc->fw_dma_addr); rproc_put(sproc->rproc); mdev->drv_data = NULL; return 0; }