aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/remoteproc
diff options
context:
space:
mode:
authorJuan Gutierrez <jgutierrez@ti.com>2011-08-19 12:33:21 -0500
committerZiyann <jaraidaniel@gmail.com>2014-10-01 12:57:05 +0200
commit6373f77903faf1da8d7ca9b8a1c6d8d7bea358b3 (patch)
tree8f99ee2ee713920370db826f16d08dd01b0ec130 /drivers/remoteproc
parent812a42bd9cdcc3fba0041b113633ae62c9178624 (diff)
downloadkernel_samsung_tuna-6373f77903faf1da8d7ca9b8a1c6d8d7bea358b3.tar.gz
kernel_samsung_tuna-6373f77903faf1da8d7ca9b8a1c6d8d7bea358b3.tar.bz2
kernel_samsung_tuna-6373f77903faf1da8d7ca9b8a1c6d8d7bea358b3.zip
omap: remoteproc: add support for a boot register
Some remote processors (like DSP) need to explicitly configure a boot address in a special register or memory location, and this is the address from which they start executing code when taken out of reset. Support for this infrastructure has been added to remoteproc code. The memory or register address where the boot address is to be stored is supplied through the boot_reg field of the platform data in the remoteproc. The omap_rproc_start function will fetch the boot address from the image, and write this address into the boot register, if provided, before taking the processor out of reset. Change-Id: I4efc5824791eda6e23e5d568f4568a3fe3d0014b Signed-off-by: Juan Gutierrez <jgutierrez@ti.com> Signed-off-by: Suman Anna <s-anna@ti.com>
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r--drivers/remoteproc/omap_remoteproc.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c
index 5279293b92e..3f24db84fa8 100644
--- a/drivers/remoteproc/omap_remoteproc.c
+++ b/drivers/remoteproc/omap_remoteproc.c
@@ -437,6 +437,16 @@ static irqreturn_t omap_rproc_watchdog_isr(int irq, void *p)
return IRQ_HANDLED;
}
#endif
+
+static inline void _load_boot_addr(struct rproc *rproc, u64 bootaddr)
+{
+ struct omap_rproc_pdata *pdata = rproc->dev->platform_data;
+
+ if (pdata->boot_reg)
+ omap_writel(bootaddr, pdata->boot_reg);
+ return;
+}
+
static inline int omap_rproc_start(struct rproc *rproc, u64 bootaddr)
{
struct device *dev = rproc->dev;
@@ -457,8 +467,11 @@ static inline int omap_rproc_start(struct rproc *rproc, u64 bootaddr)
}
#ifdef CONFIG_REMOTE_PROC_AUTOSUSPEND
- _init_pm_flags(rproc);
+ ret = _init_pm_flags(rproc);
+ if (ret)
+ return ret;
#endif
+
for (i = 0; i < pdata->timers_cnt; i++) {
timers[i].odt = omap_dm_timer_request_specific(timers[i].id);
if (!timers[i].odt) {
@@ -478,6 +491,7 @@ static inline int omap_rproc_start(struct rproc *rproc, u64 bootaddr)
#endif
}
+ _load_boot_addr(rproc, bootaddr);
ret = omap_device_enable(pdev);
out:
if (ret) {