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

firmware: tegra: Enable BPMP support on Tegra234

Enable support for the BPMP on Tegra234 to avoid relying on Tegra194
being enabled to pull in the needed OF device ID table entry.

On simulation platforms the BPMP hasn't booted up yet by the time we
probe the BPMP driver and the BPMP hasn't had a chance to mark the
doorbell as ringable by the CCPLEX. This corresponding check in the
BPMP driver will therefore fail. Work around this by disabling the
check on simulation platforms.

Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>

+10 -2
+2 -1
drivers/firmware/tegra/bpmp.c
··· 856 856 857 857 static const struct of_device_id tegra_bpmp_match[] = { 858 858 #if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC) || \ 859 - IS_ENABLED(CONFIG_ARCH_TEGRA_194_SOC) 859 + IS_ENABLED(CONFIG_ARCH_TEGRA_194_SOC) || \ 860 + IS_ENABLED(CONFIG_ARCH_TEGRA_234_SOC) 860 861 { .compatible = "nvidia,tegra186-bpmp", .data = &tegra186_soc }, 861 862 #endif 862 863 #if IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC)
+8 -1
drivers/mailbox/tegra-hsp.c
··· 13 13 #include <linux/pm.h> 14 14 #include <linux/slab.h> 15 15 16 + #include <soc/tegra/fuse.h> 17 + 16 18 #include <dt-bindings/mailbox/tegra186-hsp.h> 17 19 18 20 #include "mailbox.h" ··· 324 322 if (!ccplex) 325 323 return -ENODEV; 326 324 327 - if (!tegra_hsp_doorbell_can_ring(db)) 325 + /* 326 + * On simulation platforms the BPMP hasn't had a chance yet to mark 327 + * the doorbell as ringable by the CCPLEX, so we want to skip extra 328 + * checks here. 329 + */ 330 + if (tegra_is_silicon() && !tegra_hsp_doorbell_can_ring(db)) 328 331 return -ENODEV; 329 332 330 333 spin_lock_irqsave(&hsp->lock, flags);