Skip to content

Commit 10b2006

Browse files
jonhunterthierryreding
authored andcommitted
firmware: tegra: Defer BPMP probe if shared memory not available
Since commit 93d2e43 ("of: platform: Batch fwnode parsing when adding all top level devices") was added, the probing of the Tegra SRAM device has occurred later in the boot sequence, after the BPMP has been probed. The BPMP uses sections of the SRAM for shared memory and if the BPMP is probed before the SRAM then it fails to probe and never tries again. This is causing a boot failure on Tegra186 and Tegra194. Fix this by allowing the probe of the BPMP to be deferred if the SRAM is not available yet. Signed-off-by: Jon Hunter <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent b720aaa commit 10b2006

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/firmware/tegra/bpmp-tegra186.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ static int tegra186_bpmp_init(struct tegra_bpmp *bpmp)
176176
priv->tx.pool = of_gen_pool_get(bpmp->dev->of_node, "shmem", 0);
177177
if (!priv->tx.pool) {
178178
dev_err(bpmp->dev, "TX shmem pool not found\n");
179-
return -ENOMEM;
179+
return -EPROBE_DEFER;
180180
}
181181

182182
priv->tx.virt = gen_pool_dma_alloc(priv->tx.pool, 4096, &priv->tx.phys);
@@ -188,7 +188,7 @@ static int tegra186_bpmp_init(struct tegra_bpmp *bpmp)
188188
priv->rx.pool = of_gen_pool_get(bpmp->dev->of_node, "shmem", 1);
189189
if (!priv->rx.pool) {
190190
dev_err(bpmp->dev, "RX shmem pool not found\n");
191-
err = -ENOMEM;
191+
err = -EPROBE_DEFER;
192192
goto free_tx;
193193
}
194194

0 commit comments

Comments
 (0)