firmware: tegra: bpmp: fix T234 build failure
PATCH 1/1 firmware: tegra: bpmp: fix T234 build failure
From: Arnd Bergmann <[email protected]>
When only Tegra 234 is enabled, the bpmp driver fails to build:
drivers/firmware/tegra/bpmp.c:861:51: error: 'tegra186_soc' undeclared here (not in a function)
861 | { .compatible = "nvidia,tegra186-bpmp", .data = &tegra186_soc },
| ^~~~~~~~~~~~
Fix the #ifdef statement to match the location in which this symbol is used.
--- drivers/firmware/tegra/Makefile | 1 + drivers/firmware/tegra/bpmp-private.h | 3 ++- drivers/firmware/tegra/bpmp.c | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-)
drivers/firmware/tegra/Makefile +1 -0
@@ -3,6 +3,7 @@ tegra-bpmp-y = bpmp.o tegra-bpmp-$(CONFIG_ARCH_TEGRA_210_SOC) += bpmp-tegra210.o tegra-bpmp-$(CONFIG_ARCH_TEGRA_186_SOC) += bpmp-tegra186.o tegra-bpmp-$(CONFIG_ARCH_TEGRA_194_SOC) += bpmp-tegra186.o +tegra-bpmp-$(CONFIG_ARCH_TEGRA_234_SOC) += bpmp-tegra186.o tegra-bpmp-$(CONFIG_DEBUG_FS) += bpmp-debugfs.o obj-$(CONFIG_TEGRA_BPMP) += tegra-bpmp.o obj-$(CONFIG_TEGRA_IVC) += ivc.o
drivers/firmware/tegra/bpmp-private.h +2 -1
@@ -24,7 +24,8 @@ struct tegra_bpmp_ops { };#if IS_ENABLED (CONFIG_ARCH_TEGRA_186_SOC ) || \ -IS_ENABLED (CONFIG_ARCH_TEGRA_194_SOC ) +IS_ENABLED (CONFIG_ARCH_TEGRA_194_SOC ) || \ +IS_ENABLED (CONFIG_ARCH_TEGRA_234_SOC )extern const struct tegra_bpmp_ops tegra186_bpmp_ops;#endif #if IS_ENABLED (CONFIG_ARCH_TEGRA_210_SOC )
drivers/firmware/tegra/bpmp.c +2 -1
@@ -809,7 +809,8 @@ static const struct dev_pm_ops tegra_bpmp_pm_ops = { }; #if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC) || \ - IS_ENABLED(CONFIG_ARCH_TEGRA_194_SOC) + IS_ENABLED(CONFIG_ARCH_TEGRA_194_SOC) || \ + IS_ENABLED(CONFIG_ARCH_TEGRA_234_SOC) static const struct tegra_bpmp_soc tegra186_soc = { .channels = { .cpu_tx = {
Signature · 1 line
2.27.0
Quoted 12 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
When only Tegra 234 is enabled, the bpmp driver fails to build:
drivers/firmware/tegra/bpmp.c:861:51: error: 'tegra186_soc' undeclared here (not in a function)
861 | { .compatible = "nvidia,tegra186-bpmp", .data =&tegra186_soc},
| ^~~~~~~~~~~~Fix the #ifdef statement to match the location in which this symbol is used.
Quoted 7 lines
Fixes 0ebdf11699d0 ("firmware: tegra: Enable BPMP support on Tegra234")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/firmware/tegra/Makefile | 1 + drivers/firmware/tegra/bpmp-private.h | 3 ++- drivers/firmware/tegra/bpmp.c | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-)
Sigh... I wonder if I should just give up and eliminate all ARCH_TEGRA_XYZ_SOC options. There's not a lot that we gain by keeping them around and most people will be building multi-platform configurations anyway, so there's very little point to it.
Anyway, this looks good, so:
Let me know if you'd prefer me to pick this up and send as a follow-up pull request for Tegra.
Thierry