Skip to content

Commit 27d0ff5

Browse files
committed
Merge tag 'tegra-for-6.17-firmware' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/drivers
firmware: tegra: Updates for v6.17-rc1 Add Tegra264 support for the BPMP, fix some dependency issues and clean up some code using new OF helpers. * tag 'tegra-for-6.17-firmware' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: firmware: tegra: bpmp: Fix build failure for tegra264-only config firmware: tegra: bpmp: Use of_reserved_mem_region_to_resource() for "memory-region" firmware: tegra: bpmp: Add support on Tegra264 firmware: tegra: Fix IVC dependency problems Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnd Bergmann <[email protected]>
2 parents 8adc8e1 + 83f96a7 commit 27d0ff5

File tree

5 files changed

+10
-17
lines changed

5 files changed

+10
-17
lines changed

drivers/firmware/tegra/Kconfig

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
menu "Tegra firmware driver"
33

44
config TEGRA_IVC
5-
bool "Tegra IVC protocol"
5+
bool "Tegra IVC protocol" if COMPILE_TEST
66
depends on ARCH_TEGRA
77
help
88
IVC (Inter-VM Communication) protocol is part of the IPC
@@ -13,8 +13,9 @@ config TEGRA_IVC
1313

1414
config TEGRA_BPMP
1515
bool "Tegra BPMP driver"
16-
depends on ARCH_TEGRA && TEGRA_HSP_MBOX && TEGRA_IVC
16+
depends on ARCH_TEGRA && TEGRA_HSP_MBOX
1717
depends on !CPU_BIG_ENDIAN
18+
select TEGRA_IVC
1819
help
1920
BPMP (Boot and Power Management Processor) is designed to off-loading
2021
the PM functions which include clock/DVFS/thermal/power from the CPU.

drivers/firmware/tegra/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ tegra-bpmp-$(CONFIG_ARCH_TEGRA_210_SOC) += bpmp-tegra210.o
44
tegra-bpmp-$(CONFIG_ARCH_TEGRA_186_SOC) += bpmp-tegra186.o
55
tegra-bpmp-$(CONFIG_ARCH_TEGRA_194_SOC) += bpmp-tegra186.o
66
tegra-bpmp-$(CONFIG_ARCH_TEGRA_234_SOC) += bpmp-tegra186.o
7+
tegra-bpmp-$(CONFIG_ARCH_TEGRA_264_SOC) += bpmp-tegra186.o
78
tegra-bpmp-$(CONFIG_DEBUG_FS) += bpmp-debugfs.o
89
obj-$(CONFIG_TEGRA_BPMP) += tegra-bpmp.o
910
obj-$(CONFIG_TEGRA_IVC) += ivc.o

drivers/firmware/tegra/bpmp-private.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,7 @@ struct tegra_bpmp_ops {
2323
int (*resume)(struct tegra_bpmp *bpmp);
2424
};
2525

26-
#if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC) || \
27-
IS_ENABLED(CONFIG_ARCH_TEGRA_194_SOC) || \
28-
IS_ENABLED(CONFIG_ARCH_TEGRA_234_SOC)
2926
extern const struct tegra_bpmp_ops tegra186_bpmp_ops;
30-
#endif
31-
#if IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC)
3227
extern const struct tegra_bpmp_ops tegra210_bpmp_ops;
33-
#endif
3428

3529
#endif

drivers/firmware/tegra/bpmp-tegra186.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <linux/genalloc.h>
77
#include <linux/io.h>
88
#include <linux/mailbox_client.h>
9-
#include <linux/of_address.h>
9+
#include <linux/of_reserved_mem.h>
1010
#include <linux/platform_device.h>
1111

1212
#include <soc/tegra/bpmp.h>
@@ -192,16 +192,11 @@ static void tegra186_bpmp_teardown_channels(struct tegra_bpmp *bpmp)
192192
static int tegra186_bpmp_dram_init(struct tegra_bpmp *bpmp)
193193
{
194194
struct tegra186_bpmp *priv = bpmp->priv;
195-
struct device_node *np;
196195
struct resource res;
197196
size_t size;
198197
int err;
199198

200-
np = of_parse_phandle(bpmp->dev->of_node, "memory-region", 0);
201-
if (!np)
202-
return -ENODEV;
203-
204-
err = of_address_to_resource(np, 0, &res);
199+
err = of_reserved_mem_region_to_resource(bpmp->dev->of_node, 0, &res);
205200
if (err < 0) {
206201
dev_warn(bpmp->dev, "failed to parse memory region: %d\n", err);
207202
return err;

drivers/firmware/tegra/bpmp.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,8 @@ static const struct dev_pm_ops tegra_bpmp_pm_ops = {
836836

837837
#if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC) || \
838838
IS_ENABLED(CONFIG_ARCH_TEGRA_194_SOC) || \
839-
IS_ENABLED(CONFIG_ARCH_TEGRA_234_SOC)
839+
IS_ENABLED(CONFIG_ARCH_TEGRA_234_SOC) || \
840+
IS_ENABLED(CONFIG_ARCH_TEGRA_264_SOC)
840841
static const struct tegra_bpmp_soc tegra186_soc = {
841842
.channels = {
842843
.cpu_tx = {
@@ -884,7 +885,8 @@ static const struct tegra_bpmp_soc tegra210_soc = {
884885
static const struct of_device_id tegra_bpmp_match[] = {
885886
#if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC) || \
886887
IS_ENABLED(CONFIG_ARCH_TEGRA_194_SOC) || \
887-
IS_ENABLED(CONFIG_ARCH_TEGRA_234_SOC)
888+
IS_ENABLED(CONFIG_ARCH_TEGRA_234_SOC) || \
889+
IS_ENABLED(CONFIG_ARCH_TEGRA_264_SOC)
888890
{ .compatible = "nvidia,tegra186-bpmp", .data = &tegra186_soc },
889891
#endif
890892
#if IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC)

0 commit comments

Comments
 (0)