diff mbox series

[2/2] firmware/tegra: Enable Tegra186 BPMP support on Tegra194

Message ID 20190207115006.8162-2-thierry.reding@gmail.com
State Accepted
Headers show
Series [1/2] firmware: tegra: Conditionally support SoC generations | expand

Commit Message

Thierry Reding Feb. 7, 2019, 11:50 a.m. UTC
From: Thierry Reding <treding@nvidia.com>

The BPMP implementation on Tegra194 is mostly compatible with the
implementation on Tegra186, so make sure the latter is available when
support for Tegra194 is enabled.

Suggested-by: Timo Alho <talho@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 drivers/firmware/tegra/Makefile       | 1 +
 drivers/firmware/tegra/bpmp-private.h | 3 ++-
 drivers/firmware/tegra/bpmp.c         | 6 ++++--
 3 files changed, 7 insertions(+), 3 deletions(-)

Comments

Timo Alho Feb. 7, 2019, 12:04 p.m. UTC | #1
On 7.2.2019 13.50, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> The BPMP implementation on Tegra194 is mostly compatible with the
> implementation on Tegra186, so make sure the latter is available when
> support for Tegra194 is enabled.
> 
> Suggested-by: Timo Alho <talho@nvidia.com>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
>   drivers/firmware/tegra/Makefile       | 1 +
>   drivers/firmware/tegra/bpmp-private.h | 3 ++-
>   drivers/firmware/tegra/bpmp.c         | 6 ++++--
>   3 files changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/firmware/tegra/Makefile b/drivers/firmware/tegra/Makefile
> index ba45e58f7647..676b01caff05 100644
> --- a/drivers/firmware/tegra/Makefile
> +++ b/drivers/firmware/tegra/Makefile
> @@ -1,6 +1,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_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 cc343f4ebafb..54d560c48398 100644
> --- a/drivers/firmware/tegra/bpmp-private.h
> +++ b/drivers/firmware/tegra/bpmp-private.h
> @@ -23,7 +23,8 @@ struct tegra_bpmp_ops {
>   	int (*resume)(struct tegra_bpmp *bpmp);
>   };
>   
> -#if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC)
> +#if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC) || \
> +    IS_ENABLED(CONFIG_ARCH_TEGRA_194_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 6498c848c82c..dd775e8ba5a0 100644
> --- a/drivers/firmware/tegra/bpmp.c
> +++ b/drivers/firmware/tegra/bpmp.c
> @@ -813,7 +813,8 @@ static int __maybe_unused tegra_bpmp_resume(struct device *dev)
>   
>   static SIMPLE_DEV_PM_OPS(tegra_bpmp_pm_ops, NULL, tegra_bpmp_resume);
>   
> -#if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC)
> +#if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC) || \
> +    IS_ENABLED(CONFIG_ARCH_TEGRA_194_SOC)
>   static const struct tegra_bpmp_soc tegra186_soc = {
>   	.channels = {
>   		.cpu_tx = {
> @@ -859,7 +860,8 @@ static const struct tegra_bpmp_soc tegra210_soc = {
>   #endif
>   
>   static const struct of_device_id tegra_bpmp_match[] = {
> -#if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC)
> +#if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC) || \
> +    IS_ENABLED(CONFIG_ARCH_TEGRA_194_SOC)
>   	{ .compatible = "nvidia,tegra186-bpmp", .data = &tegra186_soc },
>   #endif
>   #if IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC)
> 


Reviewed-by: Timo Alho <talho@nvidia.com>
Tested-by: Timo Alho <talho@nvidia.com>
diff mbox series

Patch

diff --git a/drivers/firmware/tegra/Makefile b/drivers/firmware/tegra/Makefile
index ba45e58f7647..676b01caff05 100644
--- a/drivers/firmware/tegra/Makefile
+++ b/drivers/firmware/tegra/Makefile
@@ -1,6 +1,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_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 cc343f4ebafb..54d560c48398 100644
--- a/drivers/firmware/tegra/bpmp-private.h
+++ b/drivers/firmware/tegra/bpmp-private.h
@@ -23,7 +23,8 @@  struct tegra_bpmp_ops {
 	int (*resume)(struct tegra_bpmp *bpmp);
 };
 
-#if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC)
+#if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC) || \
+    IS_ENABLED(CONFIG_ARCH_TEGRA_194_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 6498c848c82c..dd775e8ba5a0 100644
--- a/drivers/firmware/tegra/bpmp.c
+++ b/drivers/firmware/tegra/bpmp.c
@@ -813,7 +813,8 @@  static int __maybe_unused tegra_bpmp_resume(struct device *dev)
 
 static SIMPLE_DEV_PM_OPS(tegra_bpmp_pm_ops, NULL, tegra_bpmp_resume);
 
-#if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC)
+#if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC) || \
+    IS_ENABLED(CONFIG_ARCH_TEGRA_194_SOC)
 static const struct tegra_bpmp_soc tegra186_soc = {
 	.channels = {
 		.cpu_tx = {
@@ -859,7 +860,8 @@  static const struct tegra_bpmp_soc tegra210_soc = {
 #endif
 
 static const struct of_device_id tegra_bpmp_match[] = {
-#if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC)
+#if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC) || \
+    IS_ENABLED(CONFIG_ARCH_TEGRA_194_SOC)
 	{ .compatible = "nvidia,tegra186-bpmp", .data = &tegra186_soc },
 #endif
 #if IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC)