diff options
author | Dima Zavin <dima@android.com> | 2011-10-19 22:24:32 -0700 |
---|---|---|
committer | Dima Zavin <dima@android.com> | 2011-10-19 22:24:32 -0700 |
commit | ad9cf2c358c2c729c56bf2366733a5df25143888 (patch) | |
tree | ecce1c68286e5cbcc986f71c2c82386026ab4fed /drivers/remoteproc | |
parent | 0d70823e58d8894637f69dbe6544b6858c847347 (diff) | |
parent | 1b2a119c90466bb5973ea5d35e052a934f6a3486 (diff) | |
download | kernel_samsung_tuna-ad9cf2c358c2c729c56bf2366733a5df25143888.tar.gz kernel_samsung_tuna-ad9cf2c358c2c729c56bf2366733a5df25143888.tar.bz2 kernel_samsung_tuna-ad9cf2c358c2c729c56bf2366733a5df25143888.zip |
Merge branch 'android-omap-3.0' into android-omap-tuna-3.0
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r-- | drivers/remoteproc/remoteproc.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/remoteproc/remoteproc.c b/drivers/remoteproc/remoteproc.c index ef9d0ffad23..680a701f11d 100644 --- a/drivers/remoteproc/remoteproc.c +++ b/drivers/remoteproc/remoteproc.c @@ -655,7 +655,7 @@ static void rproc_start(struct rproc *rproc, u64 bootaddr) if (err) { dev_err(dev, "can't configure watchdog timer %d\n", err); - goto unlock_mutex; + goto wdt_error; } } @@ -667,7 +667,7 @@ static void rproc_start(struct rproc *rproc, u64 bootaddr) err = rproc->ops->start(rproc, bootaddr); if (err) { dev_err(dev, "can't start rproc %s: %d\n", rproc->name, err); - goto unlock_mutex; + goto start_error; } #ifdef CONFIG_REMOTE_PROC_AUTOSUSPEND @@ -683,14 +683,25 @@ static void rproc_start(struct rproc *rproc, u64 bootaddr) rproc->state = RPROC_RUNNING; dev_info(dev, "remote processor %s is now up\n", rproc->name); + rproc->secure_ok = true; + complete_all(&rproc->secure_restart); + mutex_unlock(&rproc->lock); + + return; -unlock_mutex: /* * signal always, as we would need a notification in both the * normal->secure & secure->normal mode transitions, otherwise * we would have to introduce one more variable. */ - rproc->secure_ok = !err; +start_error: + if (rproc->ops->watchdog_exit) + rproc->ops->watchdog_exit(rproc); +wdt_error: + if (rproc->ops->iommu_exit) + rproc->ops->iommu_exit(rproc); +unlock_mutex: + rproc->secure_ok = false; complete_all(&rproc->secure_restart); mutex_unlock(&rproc->lock); } |