* [PATCH] firmware: tegra: bpmp: fix T234 build failure
@ 2020-12-03 23:06 Arnd Bergmann
2020-12-04 11:11 ` Thierry Reding
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2020-12-03 23:06 UTC (permalink / raw)
To: Thierry Reding, Jonathan Hunter; +Cc: Arnd Bergmann, linux-tegra, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
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.
Fixes: 0ebdf11699d0 ("firmware: tegra: Enable BPMP support on Tegra234")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
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(-)
diff --git a/drivers/firmware/tegra/Makefile b/drivers/firmware/tegra/Makefile
index 49c87e00fafb..620cf3fdd607 100644
--- a/drivers/firmware/tegra/Makefile
+++ b/drivers/firmware/tegra/Makefile
@@ -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
diff --git a/drivers/firmware/tegra/bpmp-private.h b/drivers/firmware/tegra/bpmp-private.h
index 54d560c48398..182bfe396516 100644
--- a/drivers/firmware/tegra/bpmp-private.h
+++ b/drivers/firmware/tegra/bpmp-private.h
@@ -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)
diff --git a/drivers/firmware/tegra/bpmp.c b/drivers/firmware/tegra/bpmp.c
index 0742a90cb844..5654c5e9862b 100644
--- a/drivers/firmware/tegra/bpmp.c
+++ b/drivers/firmware/tegra/bpmp.c
@@ -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 = {
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] firmware: tegra: bpmp: fix T234 build failure
2020-12-03 23:06 [PATCH] firmware: tegra: bpmp: fix T234 build failure Arnd Bergmann
@ 2020-12-04 11:11 ` Thierry Reding
0 siblings, 0 replies; 2+ messages in thread
From: Thierry Reding @ 2020-12-04 11:11 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: Jonathan Hunter, Arnd Bergmann, linux-tegra, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1300 bytes --]
On Fri, Dec 04, 2020 at 12:06:20AM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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.
>
> Fixes: 0ebdf11699d0 ("firmware: tegra: Enable BPMP support on Tegra234")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> 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:
Acked-by: Thierry Reding <treding@nvidia.com>
Let me know if you'd prefer me to pick this up and send as a follow-up
pull request for Tegra.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-04 11:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-03 23:06 [PATCH] firmware: tegra: bpmp: fix T234 build failure Arnd Bergmann
2020-12-04 11:11 ` Thierry Reding
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).