From: Peter De Schrijver <pdeschrijver@nvidia.com>
To: Peter De Schrijver <pdeschrijver@nvidia.com>,
<thierry.reding@gmail.com>, <jonathanh@nvidia.com>
Cc: Stefan Kristiansson <stefank@nvidia.com>,
<jassisinghbrar@gmail.com>, <linux-kernel@vger.kernel.org>,
<linux-tegra@vger.kernel.org>
Subject: [PATCH v3 2/6] mailbox: tegra: add support for Tegra264
Date: Wed, 10 May 2023 17:22:44 +0300 [thread overview]
Message-ID: <20230510142248.183629-3-pdeschrijver@nvidia.com> (raw)
In-Reply-To: <20230510142248.183629-1-pdeschrijver@nvidia.com>
From: Stefan Kristiansson <stefank@nvidia.com>
Tegra264 has a slightly different doorbell register layout than
previous chips.
Signed-off-by: Stefan Kristiansson <stefank@nvidia.com>
Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
---
drivers/mailbox/tegra-hsp.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/mailbox/tegra-hsp.c b/drivers/mailbox/tegra-hsp.c
index 573481e436f5..7f98e7436d94 100644
--- a/drivers/mailbox/tegra-hsp.c
+++ b/drivers/mailbox/tegra-hsp.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
- * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2016-2023, NVIDIA CORPORATION. All rights reserved.
*/
#include <linux/delay.h>
@@ -97,6 +97,7 @@ struct tegra_hsp_soc {
const struct tegra_hsp_db_map *map;
bool has_per_mb_ie;
bool has_128_bit_mb;
+ unsigned int reg_stride;
};
struct tegra_hsp {
@@ -279,7 +280,7 @@ tegra_hsp_doorbell_create(struct tegra_hsp *hsp, const char *name,
return ERR_PTR(-ENOMEM);
offset = (1 + (hsp->num_sm / 2) + hsp->num_ss + hsp->num_as) * SZ_64K;
- offset += index * 0x100;
+ offset += index * hsp->soc->reg_stride;
db->channel.regs = hsp->regs + offset;
db->channel.hsp = hsp;
@@ -916,24 +917,35 @@ static const struct tegra_hsp_soc tegra186_hsp_soc = {
.map = tegra186_hsp_db_map,
.has_per_mb_ie = false,
.has_128_bit_mb = false,
+ .reg_stride = 0x100,
};
static const struct tegra_hsp_soc tegra194_hsp_soc = {
.map = tegra186_hsp_db_map,
.has_per_mb_ie = true,
.has_128_bit_mb = false,
+ .reg_stride = 0x100,
};
static const struct tegra_hsp_soc tegra234_hsp_soc = {
.map = tegra186_hsp_db_map,
.has_per_mb_ie = false,
.has_128_bit_mb = true,
+ .reg_stride = 0x100,
+};
+
+static const struct tegra_hsp_soc tegra264_hsp_soc = {
+ .map = tegra186_hsp_db_map,
+ .has_per_mb_ie = false,
+ .has_128_bit_mb = true,
+ .reg_stride = 0x1000,
};
static const struct of_device_id tegra_hsp_match[] = {
{ .compatible = "nvidia,tegra186-hsp", .data = &tegra186_hsp_soc },
{ .compatible = "nvidia,tegra194-hsp", .data = &tegra194_hsp_soc },
{ .compatible = "nvidia,tegra234-hsp", .data = &tegra234_hsp_soc },
+ { .compatible = "nvidia,tegra264-hsp", .data = &tegra264_hsp_soc },
{ }
};
--
2.34.1
next prev parent reply other threads:[~2023-05-10 14:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-10 14:22 [PATCH v3 0/6] firmware: tegra: Add MRQ " Peter De Schrijver
2023-05-10 14:22 ` [PATCH v3 1/6] dt-bindings: mailbox: tegra: Document Tegra264 HSP Peter De Schrijver
2023-05-10 15:00 ` Krzysztof Kozlowski
2023-05-10 14:22 ` Peter De Schrijver [this message]
2023-05-10 14:22 ` [PATCH v3 3/6] soc: tegra: fuse: add support for Tegra264 Peter De Schrijver
2023-05-10 14:22 ` [PATCH v3 4/6] dt-bindings: Add bindings to support DRAM MRQ GSCs Peter De Schrijver
2023-05-10 15:01 ` Krzysztof Kozlowski
2023-05-10 14:22 ` [PATCH v3 5/6] dt-bindings: memory-region property for tegra186-bpmp Peter De Schrijver
2023-05-10 15:01 ` Krzysztof Kozlowski
2023-05-11 8:04 ` Peter De Schrijver
2023-05-11 9:03 ` Krzysztof Kozlowski
2023-05-11 10:31 ` Peter De Schrijver
2023-05-11 16:58 ` Krzysztof Kozlowski
2023-05-10 14:22 ` [PATCH v3 6/6] firmware: tegra: bpmp: Add support for DRAM MRQ GSCs Peter De Schrijver
2023-05-10 14:43 ` [PATCH v3 0/6] firmware: tegra: Add MRQ support for Tegra264 Thierry Reding
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=20230510142248.183629-3-pdeschrijver@nvidia.com \
--to=pdeschrijver@nvidia.com \
--cc=jassisinghbrar@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=stefank@nvidia.com \
--cc=thierry.reding@gmail.com \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®