Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+8
+8
drivers/gpu/drm/tegra/falcon.c
··· 197 197 int falcon_boot(struct falcon *falcon) 198 198 { 199 199 unsigned long offset; 200 + u32 value; 200 201 int err; 201 202 202 203 if (!falcon->firmware.vaddr) 203 204 return -EINVAL; 205 + 206 + err = readl_poll_timeout(falcon->regs + FALCON_DMACTL, value, 207 + (value & (FALCON_DMACTL_IMEM_SCRUBBING | 208 + FALCON_DMACTL_DMEM_SCRUBBING)) == 0, 209 + 10, 10000); 210 + if (err < 0) 211 + return err; 204 212 205 213 falcon_writel(falcon, 0, FALCON_DMACTL); 206 214