From: Thierry Reding <thierry.reding@gmail.com> To: Thierry Reding <thierry.reding@gmail.com> Cc: Jon Hunter <jonathanh@nvidia.com>, linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 13/14] firmware: tegra: Enable BPMP support on Tegra234 Date: Thu, 17 Sep 2020 12:07:51 +0200 [thread overview] Message-ID: <20200917100752.3516153-14-thierry.reding@gmail.com> (raw) In-Reply-To: <20200917100752.3516153-1-thierry.reding@gmail.com> From: Thierry Reding <treding@nvidia.com> Enable support for the BPMP on Tegra234 to avoid relying on Tegra194 being enabled to pull in the needed OF device ID table entry. On simulation platforms the BPMP hasn't booted up yet by the time we probe the BPMP driver and the BPMP hasn't had a chance to mark the doorbell as ringable by the CCPLEX. This corresponding check in the BPMP driver will therefore fail. Work around this by disabling the check on simulation platforms. Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com> --- drivers/firmware/tegra/bpmp.c | 3 ++- drivers/mailbox/tegra-hsp.c | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/tegra/bpmp.c b/drivers/firmware/tegra/bpmp.c index 4d93d8925e14..0742a90cb844 100644 --- a/drivers/firmware/tegra/bpmp.c +++ b/drivers/firmware/tegra/bpmp.c @@ -856,7 +856,8 @@ static const struct tegra_bpmp_soc tegra210_soc = { static const struct of_device_id tegra_bpmp_match[] = { #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) { .compatible = "nvidia,tegra186-bpmp", .data = &tegra186_soc }, #endif #if IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC) diff --git a/drivers/mailbox/tegra-hsp.c b/drivers/mailbox/tegra-hsp.c index 834b35dc3b13..e07091d71986 100644 --- a/drivers/mailbox/tegra-hsp.c +++ b/drivers/mailbox/tegra-hsp.c @@ -13,6 +13,8 @@ #include <linux/pm.h> #include <linux/slab.h> +#include <soc/tegra/fuse.h> + #include <dt-bindings/mailbox/tegra186-hsp.h> #include "mailbox.h" @@ -322,7 +324,12 @@ static int tegra_hsp_doorbell_startup(struct mbox_chan *chan) if (!ccplex) return -ENODEV; - if (!tegra_hsp_doorbell_can_ring(db)) + /* + * On simulation platforms the BPMP hasn't had a chance yet to mark + * the doorbell as ringable by the CCPLEX, so we want to skip extra + * checks here. + */ + if (tegra_is_silicon() && !tegra_hsp_doorbell_can_ring(db)) return -ENODEV; spin_lock_irqsave(&hsp->lock, flags); -- 2.28.0
WARNING: multiple messages have this Message-ID (diff)
From: Thierry Reding <thierry.reding@gmail.com> To: Thierry Reding <thierry.reding@gmail.com> Cc: linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jon Hunter <jonathanh@nvidia.com> Subject: [PATCH v2 13/14] firmware: tegra: Enable BPMP support on Tegra234 Date: Thu, 17 Sep 2020 12:07:51 +0200 [thread overview] Message-ID: <20200917100752.3516153-14-thierry.reding@gmail.com> (raw) In-Reply-To: <20200917100752.3516153-1-thierry.reding@gmail.com> From: Thierry Reding <treding@nvidia.com> Enable support for the BPMP on Tegra234 to avoid relying on Tegra194 being enabled to pull in the needed OF device ID table entry. On simulation platforms the BPMP hasn't booted up yet by the time we probe the BPMP driver and the BPMP hasn't had a chance to mark the doorbell as ringable by the CCPLEX. This corresponding check in the BPMP driver will therefore fail. Work around this by disabling the check on simulation platforms. Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com> --- drivers/firmware/tegra/bpmp.c | 3 ++- drivers/mailbox/tegra-hsp.c | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/tegra/bpmp.c b/drivers/firmware/tegra/bpmp.c index 4d93d8925e14..0742a90cb844 100644 --- a/drivers/firmware/tegra/bpmp.c +++ b/drivers/firmware/tegra/bpmp.c @@ -856,7 +856,8 @@ static const struct tegra_bpmp_soc tegra210_soc = { static const struct of_device_id tegra_bpmp_match[] = { #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) { .compatible = "nvidia,tegra186-bpmp", .data = &tegra186_soc }, #endif #if IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC) diff --git a/drivers/mailbox/tegra-hsp.c b/drivers/mailbox/tegra-hsp.c index 834b35dc3b13..e07091d71986 100644 --- a/drivers/mailbox/tegra-hsp.c +++ b/drivers/mailbox/tegra-hsp.c @@ -13,6 +13,8 @@ #include <linux/pm.h> #include <linux/slab.h> +#include <soc/tegra/fuse.h> + #include <dt-bindings/mailbox/tegra186-hsp.h> #include "mailbox.h" @@ -322,7 +324,12 @@ static int tegra_hsp_doorbell_startup(struct mbox_chan *chan) if (!ccplex) return -ENODEV; - if (!tegra_hsp_doorbell_can_ring(db)) + /* + * On simulation platforms the BPMP hasn't had a chance yet to mark + * the doorbell as ringable by the CCPLEX, so we want to skip extra + * checks here. + */ + if (tegra_is_silicon() && !tegra_hsp_doorbell_can_ring(db)) return -ENODEV; spin_lock_irqsave(&hsp->lock, flags); -- 2.28.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-09-17 10:08 UTC|newest] Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-09-17 10:07 [PATCH v2 00/14] arm64: tegra: Initial Tegra234 VDK support Thierry Reding 2020-09-17 10:07 ` Thierry Reding 2020-09-17 10:07 ` [PATCH v2 01/14] dt-bindings: misc: tegra-apbmisc: Add missing compatible strings Thierry Reding 2020-09-17 10:07 ` Thierry Reding 2020-09-17 10:07 ` [PATCH v2 02/14] dt-bindings: misc: tegra186-misc: Add missing compatible string Thierry Reding 2020-09-17 10:07 ` Thierry Reding 2020-09-17 10:07 ` [PATCH v2 03/14] dt-bindings: misc: tegra186-misc: Add Tegra234 support Thierry Reding 2020-09-17 10:07 ` Thierry Reding 2020-09-17 10:07 ` [PATCH v2 04/14] dt-bindings: tegra: Add Tegra234 VDK compatible Thierry Reding 2020-09-17 10:07 ` Thierry Reding 2020-09-17 10:07 ` [PATCH v2 05/14] dt-bindings: fuse: tegra: Add Tegra234 support Thierry Reding 2020-09-17 10:07 ` Thierry Reding 2020-09-17 10:07 ` [PATCH v2 06/14] dt-bindings: tegra: pmc: " Thierry Reding 2020-09-17 10:07 ` Thierry Reding 2020-09-17 10:07 ` [PATCH v2 07/14] soc/tegra: fuse: Extract tegra_get_platform() Thierry Reding 2020-09-17 10:07 ` Thierry Reding 2020-09-17 10:07 ` [PATCH v2 08/14] soc/tegra: fuse: Implement tegra_is_silicon() Thierry Reding 2020-09-17 10:07 ` Thierry Reding 2020-09-17 10:07 ` [PATCH v2 09/14] soc/tegra: fuse: Add Tegra234 support Thierry Reding 2020-09-17 10:07 ` Thierry Reding 2020-09-17 10:07 ` [PATCH v2 10/14] soc/tegra: misc: " Thierry Reding 2020-09-17 10:07 ` Thierry Reding 2020-09-17 10:07 ` [PATCH v2 11/14] soc/tegra: pmc: Reorder reset sources/levels definitions Thierry Reding 2020-09-17 10:07 ` Thierry Reding 2020-09-17 10:07 ` [PATCH v2 12/14] soc/tegra: pmc: Add Tegra234 support Thierry Reding 2020-09-17 10:07 ` Thierry Reding 2020-09-17 10:07 ` Thierry Reding [this message] 2020-09-17 10:07 ` [PATCH v2 13/14] firmware: tegra: Enable BPMP support on Tegra234 Thierry Reding 2020-09-17 10:07 ` [PATCH v2 14/14] arm64: tegra: Initial Tegra234 VDK support Thierry Reding 2020-09-17 10:07 ` Thierry Reding 2020-09-24 10:32 ` Mikko Perttunen 2020-09-24 10:32 ` Mikko Perttunen 2020-09-18 12:54 ` [PATCH v2 00/14] " Jon Hunter 2020-09-18 12:54 ` Jon Hunter
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200917100752.3516153-14-thierry.reding@gmail.com \ --to=thierry.reding@gmail.com \ --cc=jonathanh@nvidia.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-tegra@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.