All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] soc/tegra: Fix build with Tegra234 configuration
@ 2021-03-27 12:37 Xie XiuQi
  2021-03-27 12:37 ` [PATCH 1/2] soc/tegra: fuse: " Xie XiuQi
  2021-03-27 12:37 ` [PATCH 2/2] firmware: tegra: " Xie XiuQi
  0 siblings, 2 replies; 3+ messages in thread
From: Xie XiuQi @ 2021-03-27 12:37 UTC (permalink / raw)
  To: thierry.reding, jonathanh; +Cc: linux-tegra, linux-kernel, yangyingliang

If only Tegra234 support is enabled, we got this build error:

 make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j128
  CALL    scripts/atomic/check-atomics.sh
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CC      drivers/soc/tegra/fuse/fuse-tegra30.o
drivers/soc/tegra/fuse/fuse-tegra30.c:376:10: error: ‘tegra30_fuse_read’ undeclared here (not in a function); did you mean ‘tegra_fuse_readl’?
  .read = tegra30_fuse_read,
          ^~~~~~~~~~~~~~~~~
          tegra_fuse_readl
drivers/soc/tegra/fuse/fuse-tegra30.c:382:10: error: ‘tegra30_fuse_init’ undeclared here (not in a function); did you mean ‘tegra30_fuse_read’?
  .init = tegra30_fuse_init,
          ^~~~~~~~~~~~~~~~~
          tegra30_fuse_read
  CC      drivers/firmware/tegra/bpmp.o
  CHK     kernel/kheaders_data.tar.xz
drivers/firmware/tegra/bpmp.c:861:51: error: ‘tegra186_soc’ undeclared here (not in a function); did you mean ‘tegra_ivc’?
  { .compatible = "nvidia,tegra186-bpmp", .data = &tegra186_soc },
                                                   ^~~~~~~~~~~~
                                                   tegra_ivc

Xie XiuQi (2):
  soc/tegra: fuse: Fix build with Tegra234 configuration
  firmware: tegra: Fix build with Tegra234 configuration

 drivers/firmware/tegra/Makefile       | 1 +
 drivers/firmware/tegra/bpmp-private.h | 3 ++-
 drivers/firmware/tegra/bpmp.c         | 3 ++-
 drivers/soc/tegra/fuse/fuse-tegra30.c | 3 ++-
 4 files changed, 7 insertions(+), 3 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] soc/tegra: fuse: Fix build with Tegra234 configuration
  2021-03-27 12:37 [PATCH 0/2] soc/tegra: Fix build with Tegra234 configuration Xie XiuQi
@ 2021-03-27 12:37 ` Xie XiuQi
  2021-03-27 12:37 ` [PATCH 2/2] firmware: tegra: " Xie XiuQi
  1 sibling, 0 replies; 3+ messages in thread
From: Xie XiuQi @ 2021-03-27 12:37 UTC (permalink / raw)
  To: thierry.reding, jonathanh; +Cc: linux-tegra, linux-kernel, yangyingliang

If only Tegra234 support is enabled, the tegra30_fuse_read() and
tegra30_fuse_init() function are not declared and cause a build failure.
Add Tegra234 to the preprocessor guard to make sure these functions are
available for Tegra234-only builds as well.

Fixes: 1f44febf71ba ("soc/tegra: fuse: Add Tegra234 support")
Signed-off-by: Xie XiuQi <xiexiuqi@huawei.com>
---
 drivers/soc/tegra/fuse/fuse-tegra30.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/soc/tegra/fuse/fuse-tegra30.c b/drivers/soc/tegra/fuse/fuse-tegra30.c
index 9ea7f0168457..c1aa7815bd6e 100644
--- a/drivers/soc/tegra/fuse/fuse-tegra30.c
+++ b/drivers/soc/tegra/fuse/fuse-tegra30.c
@@ -37,7 +37,8 @@
     defined(CONFIG_ARCH_TEGRA_132_SOC) || \
     defined(CONFIG_ARCH_TEGRA_210_SOC) || \
     defined(CONFIG_ARCH_TEGRA_186_SOC) || \
-    defined(CONFIG_ARCH_TEGRA_194_SOC)
+    defined(CONFIG_ARCH_TEGRA_194_SOC) || \
+    defined(CONFIG_ARCH_TEGRA_234_SOC)
 static u32 tegra30_fuse_read_early(struct tegra_fuse *fuse, unsigned int offset)
 {
 	if (WARN_ON(!fuse->base))
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] firmware: tegra: Fix build with Tegra234 configuration
  2021-03-27 12:37 [PATCH 0/2] soc/tegra: Fix build with Tegra234 configuration Xie XiuQi
  2021-03-27 12:37 ` [PATCH 1/2] soc/tegra: fuse: " Xie XiuQi
@ 2021-03-27 12:37 ` Xie XiuQi
  1 sibling, 0 replies; 3+ messages in thread
From: Xie XiuQi @ 2021-03-27 12:37 UTC (permalink / raw)
  To: thierry.reding, jonathanh; +Cc: linux-tegra, linux-kernel, yangyingliang

If only Tegra234 support is enabled, the tegra186_bpmp_ops and
tegra186_soc are not defined and cause a build failure.

Add Tegra234 to the preprocessor guard to make sure these functions are
available for Tegra234-only builds as well.

Fixes: 0ebdf11699d0 ("firmware: tegra: Enable BPMP support on Tegra234")
Signed-off-by: Xie XiuQi <xiexiuqi@huawei.com>
---
 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.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-27 12:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-27 12:37 [PATCH 0/2] soc/tegra: Fix build with Tegra234 configuration Xie XiuQi
2021-03-27 12:37 ` [PATCH 1/2] soc/tegra: fuse: " Xie XiuQi
2021-03-27 12:37 ` [PATCH 2/2] firmware: tegra: " Xie XiuQi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.