diff options
author | Thierry Reding <treding@nvidia.com> | 2018-11-23 13:06:39 +0100 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2018-11-29 17:11:49 +0100 |
commit | b91bf997ea6efe9c48540572d693415fddaf0c3a (patch) | |
tree | f1c99daa1b1c04df441deaebeacea5152af9c2ba /drivers/gpu/drm/tegra | |
parent | drm/tegra: falcon: Fix error handling (diff) | |
download | linux-b91bf997ea6efe9c48540572d693415fddaf0c3a.tar.xz linux-b91bf997ea6efe9c48540572d693415fddaf0c3a.zip |
drm/tegra: falcon: Wait for memory scrubbing to complete
Before booting the Falcon processor, make sure to wait for memory
scrubbing to complete.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/tegra')
-rw-r--r-- | drivers/gpu/drm/tegra/falcon.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/tegra/falcon.c b/drivers/gpu/drm/tegra/falcon.c index 78c7a0156601..352d05feabb0 100644 --- a/drivers/gpu/drm/tegra/falcon.c +++ b/drivers/gpu/drm/tegra/falcon.c @@ -197,11 +197,19 @@ void falcon_exit(struct falcon *falcon) int falcon_boot(struct falcon *falcon) { unsigned long offset; + u32 value; int err; if (!falcon->firmware.vaddr) return -EINVAL; + err = readl_poll_timeout(falcon->regs + FALCON_DMACTL, value, + (value & (FALCON_DMACTL_IMEM_SCRUBBING | + FALCON_DMACTL_DMEM_SCRUBBING)) == 0, + 10, 10000); + if (err < 0) + return err; + falcon_writel(falcon, 0, FALCON_DMACTL); /* setup the address of the binary data so Falcon can access it later */ |