diff options
author | Fernando Guzman Lugo <fernando.lugo@ti.com> | 2011-10-18 14:59:34 -0500 |
---|---|---|
committer | Fernando Guzman Lugo <fernando.lugo@ti.com> | 2011-10-18 17:24:47 -0500 |
commit | 61a044d436aa1891d08010d027cc3d13ab2cbf0f (patch) | |
tree | 5dbd04a12b216a0f5905667e7ebca947f5d284b3 /drivers/remoteproc | |
parent | d587362f15f3c5e9d0164795ce2118d09feabcc0 (diff) | |
download | kernel_samsung_espresso10-61a044d436aa1891d08010d027cc3d13ab2cbf0f.zip kernel_samsung_espresso10-61a044d436aa1891d08010d027cc3d13ab2cbf0f.tar.gz kernel_samsung_espresso10-61a044d436aa1891d08010d027cc3d13ab2cbf0f.tar.bz2 |
omap: remoteproc: wake up remoteproc clkdm when accessing iommu
iommu is part of the domain of each remoteproc; in order to access it
to configure it or release it the domain needs to be up specially when
the remoteproc is not running cause hw could detect not activity and turn
the clkdm off. Call clkdm_wakeup to access the registers and then
clkdm_allow_idle to dont affect pm.
Change-Id: Icf0a37e8968d0d0d84c9f984fac2a06ea6b7a5c0
Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r-- | drivers/remoteproc/omap_remoteproc.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c index 81146e1..1e01a33 100644 --- a/drivers/remoteproc/omap_remoteproc.c +++ b/drivers/remoteproc/omap_remoteproc.c @@ -248,6 +248,8 @@ int omap_rproc_deactivate(struct omap_device *od) #ifdef CONFIG_REMOTE_PROC_AUTOSUSPEND struct omap_rproc_priv *rpp = rproc->priv; #endif + if (pdata->clkdm) + clkdm_wakeup(pdata->clkdm); for (i = 0; i < od->hwmods_cnt; i++) { ret = omap_hwmod_shutdown(od->hwmods[i]); @@ -270,6 +272,9 @@ int omap_rproc_deactivate(struct omap_device *od) } #endif err: + if (pdata->clkdm) + clkdm_allow_idle(pdata->clkdm); + return ret; } @@ -286,6 +291,8 @@ static int omap_rproc_iommu_init(struct rproc *rproc, if (!rpp) return -ENOMEM; + if (pdata->clkdm) + clkdm_wakeup(pdata->clkdm); iommu_set_isr(pdata->iommu_name, omap_rproc_iommu_isr, rproc); iommu_set_secure(pdata->iommu_name, rproc->secure_mode, rproc->secure_ttb); @@ -311,12 +318,17 @@ static int omap_rproc_iommu_init(struct rproc *rproc, goto err_map; } } + if (pdata->clkdm) + clkdm_allow_idle(pdata->clkdm); + return 0; err_map: iommu_put(iommu); err_mmu: iommu_set_secure(pdata->iommu_name, false, NULL); + if (pdata->clkdm) + clkdm_allow_idle(pdata->clkdm); kfree(rpp); return ret; } @@ -476,10 +488,16 @@ out: static int omap_rproc_iommu_exit(struct rproc *rproc) { struct omap_rproc_priv *rpp = rproc->priv; + struct omap_rproc_pdata *pdata = rproc->dev->platform_data; + + if (pdata->clkdm) + clkdm_wakeup(pdata->clkdm); if (rpp->iommu) iommu_put(rpp->iommu); kfree(rpp); + if (pdata->clkdm) + clkdm_allow_idle(pdata->clkdm); return 0; } |