diff options
author | Fernando Guzman Lugo <fernando.lugo@ti.com> | 2011-08-04 22:11:27 -0500 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2011-08-05 14:50:26 -0700 |
commit | 9fbe62f6eb0817894e933305b21a374423880507 (patch) | |
tree | c7629b6ccd8732efe9633347f06d0e2f4385650d /drivers/remoteproc | |
parent | c490b1794de62f97ed38ac7619e121dcf54ec189 (diff) | |
download | kernel_samsung_tuna-9fbe62f6eb0817894e933305b21a374423880507.zip kernel_samsung_tuna-9fbe62f6eb0817894e933305b21a374423880507.tar.gz kernel_samsung_tuna-9fbe62f6eb0817894e933305b21a374423880507.tar.bz2 |
omap: rpres: reset device before shutdown
rpres module manages devices that can be used by remote processors.
There are some cases where the remote processor crashes and there are
interruptions or any other pending actions that avoid clock going off
or gated and keep the clock domain in transition state. So avoid those
cases by reseting the devices which have softreset before shutdown.
Change-Id: If260c621f2669805afc85485679c717fb3f628a0
Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r-- | drivers/remoteproc/rpres_dev.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/remoteproc/rpres_dev.c b/drivers/remoteproc/rpres_dev.c index bf6dddc..d37200a 100644 --- a/drivers/remoteproc/rpres_dev.c +++ b/drivers/remoteproc/rpres_dev.c @@ -65,6 +65,8 @@ static int rpres_iss_shutdown(struct platform_device *pdev) int ret; struct rpres_platform_data *pdata = pdev->dev.platform_data; + omap_hwmod_reset(pdata->oh); + ret = omap_device_idle(pdev); if (!ret) _disable_optional_clocks(pdata->oh); @@ -72,6 +74,15 @@ static int rpres_iss_shutdown(struct platform_device *pdev) return ret; } +static int rpres_fdif_shutdown(struct platform_device *pdev) +{ + struct rpres_platform_data *pdata = pdev->dev.platform_data; + + omap_hwmod_reset(pdata->oh); + + return omap_device_idle(pdev); +} + static int rpres_scale_dev(struct platform_device *pdev, long val) { return omap_device_scale(&pdev->dev, &pdev->dev, val); @@ -104,7 +115,7 @@ static struct rpres_ops ivahd_ops = { static struct rpres_ops fdif_ops = { .start = omap_device_enable, - .stop = omap_device_idle, + .stop = rpres_fdif_shutdown, .set_lat = rpres_set_dev_lat, .set_bw = rpres_set_l3_bw, .scale_dev = rpres_scale_dev, |