summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRoger Quadros <rogerq@ti.com>2012-07-20 14:46:31 +0300
committerXavier Boudet <x-boudet@ti.com>2012-08-10 09:45:06 +0200
commit804ed7340957e6907d8cfa1c37ad15d4e3738414 (patch)
treec32e4d746aa45822c7517c22d0ccd8791df7ac51 /drivers
parentd087bcabcb13d42191fe96948ee2faa153d867f3 (diff)
remoteproc: omap: Set lantency constraint to prevent L3 errors
If the initial state of DSP power domain is OFF then it will produce L3 bus errors when DSP is booted, probably due to the higher than required latency time to switch from OFF to ON. By setting a latency constraint so that the DSP power domain is in RETentin state before booting the firmware we can get rid of the L3 errors. e.g. of L3 bus errors without this patch [ 33.025390] rproc remoteproc0: powering up dsp_c0 [ 33.047271] rproc remoteproc0: Booting fw image tesla-dsp.xe64T, size 874888 [ 33.075408] omap_hwmod: dsp: failed to hardreset [ 33.080383] omap-iommu omap-iommu.0: dsp: version 2.0 [ 33.115203] rproc remoteproc0: remote processor dsp_c0 is now up [ 33.126312] virtio_rpmsg_bus virtio0: rpmsg host is online [ 33.132415] rproc remoteproc0: registered virtio0 (type 7) [ 33.154235] omap-rproc omap-rproc.0: received echo reply from dsp_c0 [ 33.160980] ------------[ cut here ]------------ [ 33.165893] WARNING: at arch/arm/mach-omap2/omap_l3_noc.c:117 l3_interrupt_handler+0x140/0x18c() [ 33.175170] L3 custom error: MASTER:DSP TARGET:GPMC Signed-off-by: Roger Quadros <rogerq@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/remoteproc/omap_remoteproc.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c
index 4e84428328ea..d5fd4898f17d 100644
--- a/drivers/remoteproc/omap_remoteproc.c
+++ b/drivers/remoteproc/omap_remoteproc.c
@@ -41,6 +41,7 @@
/* 1 sec is fair enough time for suspending an OMAP device */
#define DEF_SUSPEND_TIMEOUT 1000
+#define DEF_QOS_LATENCY 300
/**
* struct omap_rproc - omap remote processor state
@@ -374,11 +375,16 @@ static int _suspend(struct rproc *rproc, bool auto_suspend)
static int omap_rproc_suspend(struct rproc *rproc, bool auto_suspend)
{
struct omap_rproc *oproc = rproc->priv;
+ int ret;
if (auto_suspend && !_rproc_idled(oproc))
return -EBUSY;
- return _suspend(rproc, auto_suspend);
+ ret = _suspend(rproc, auto_suspend);
+ if (ret < 0)
+ return ret;
+
+ return 0;
}
static int _resume_kick(int id, void *p, void *rproc)
@@ -395,6 +401,7 @@ static int omap_rproc_resume(struct rproc *rproc)
struct omap_rproc *oproc = rproc->priv;
oproc->suspended = false;
+
/* boot address could be lost after suspend, so restore it */
if (oproc->boot_reg)
writel(rproc->bootaddr, oproc->boot_reg);
@@ -462,9 +469,12 @@ static int __devinit omap_rproc_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, rproc);
ret = dev_pm_qos_add_request(&pdev->dev, &oproc->qos_req,
- PM_QOS_DEFAULT_VALUE);
- if (ret)
+ DEF_QOS_LATENCY);
+ if (ret < 0) {
+ dev_err(&rproc->dev, "%s failed to add QoS constraint %d\n",
+ __func__, ret);
goto iounmap;
+ }
ret = rproc_register(rproc);
if (ret)