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>
This commit is contained in:
parent
4eab8c0ebd
commit
b91bf997ea
@ -197,11 +197,19 @@ void falcon_exit(struct falcon *falcon)
|
|||||||
int falcon_boot(struct falcon *falcon)
|
int falcon_boot(struct falcon *falcon)
|
||||||
{
|
{
|
||||||
unsigned long offset;
|
unsigned long offset;
|
||||||
|
u32 value;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
if (!falcon->firmware.vaddr)
|
if (!falcon->firmware.vaddr)
|
||||||
return -EINVAL;
|
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);
|
falcon_writel(falcon, 0, FALCON_DMACTL);
|
||||||
|
|
||||||
/* setup the address of the binary data so Falcon can access it later */
|
/* setup the address of the binary data so Falcon can access it later */
|
||||||
|
Loading…
Reference in New Issue
Block a user