diff options
author | Subramaniam Chanderashekarapuram <subramaniam.ca@ti.com> | 2012-07-30 16:54:34 -0500 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2012-09-07 13:07:22 +0800 |
commit | e0601c38814898a60faacc7a397df5176588ba50 (patch) | |
tree | d6754c9ce16be7bd7ebb48c867df7fcab52a43c3 /drivers | |
parent | 8d9f19625f73569ef644f04e58e00d89eee8c5f5 (diff) |
remoteproc: omap: control mailbox states as part of rproc pm
The omap remoteproc driver, being a user of mailbox, needs to take
care of enabling/disabling mailbox properly in the pm resume/suspend
paths. This will allow the mailbox driver to save its context and
release any constraints in the disable path, and restore them back
in the enable path.
Change-Id: I0e33bf57b17eacc23e7374f07351b8e92626f3b2
Signed-off-by: Subramaniam Chanderashekarapuram <subramaniam.ca@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/remoteproc/omap_remoteproc.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c index 6a4d1b65eca3..cd9ec467dca8 100644 --- a/drivers/remoteproc/omap_remoteproc.c +++ b/drivers/remoteproc/omap_remoteproc.c @@ -419,6 +419,8 @@ static int _suspend(struct rproc *rproc, bool auto_suspend) for (i = 0; i < pdata->timers_cnt; i++) omap_dm_timer_stop(timers[i].odt); + omap_mbox_disable(oproc->mbox); + oproc->suspended = true; return 0; @@ -454,6 +456,8 @@ static int omap_rproc_resume(struct rproc *rproc) if (oproc->boot_reg) writel(rproc->bootaddr, oproc->boot_reg); + omap_mbox_enable(oproc->mbox); + /* * if need_kick flag is true, we need to kick all the vrings as * we do not know which vrings were tried to be kicked while the @@ -469,10 +473,11 @@ static int omap_rproc_resume(struct rproc *rproc) omap_dm_timer_start(timers[i].odt); ret = pdata->device_enable(pdev); - if (ret) + if (ret) { for (i = 0; i < pdata->timers_cnt; i++) omap_dm_timer_stop(timers[i].odt); - + omap_mbox_disable(oproc->mbox); + } return ret; } |