From: "Arnd Bergmann" <arnd@arndb.de>
To: "Kumari Pallavi" <kumari.pallavi@oss.qualcomm.com>,
kpallavi@qti.qualcomm.com,
"Srinivas Kandagatla" <srini@kernel.org>,
"Amol Maheshwari" <amahesh@qti.qualcomm.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Cc: quic_bkumar@quicinc.com, ekansh.gupta@oss.qualcomm.com,
linux-kernel@vger.kernel.org, quic_chennak@quicinc.com,
dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org,
"Jingyi Wang" <jingyi.wang@oss.qualcomm.com>,
aiqun.yu@oss.qualcomm.com, ktadakam@qti.qualcomm.com
Subject: Re: [PATCH v2 2/3] misc: fastrpc: Add support for new DSP IOVA formatting
Date: Wed, 15 Oct 2025 09:09:57 +0200 [thread overview]
Message-ID: <ac42d5cc-1db9-4e81-8613-ca1ac9cff9d2@app.fastmail.com> (raw)
In-Reply-To: <20251015045702.3022060-3-kumari.pallavi@oss.qualcomm.com>
On Wed, Oct 15, 2025, at 06:57, Kumari Pallavi wrote:
> @@ -2291,6 +2319,22 @@ static int fastrpc_rpmsg_probe(struct
> rpmsg_device *rpdev)
> const char *domain;
> bool secure_dsp;
> unsigned int vmids[FASTRPC_MAX_VMIDS];
> + struct device_node *root;
> + const struct of_device_id *match;
> + const struct fastrpc_soc_data *soc_data = NULL;
> +
> + root = of_find_node_by_path("/");
> + if (!root)
> + return -ENODEV;
> +
> + match = of_match_node(qcom_soc_match_table, root);
> + of_node_put(root);
> + if (!match || !match->data) {
> + soc_data = &default_soc_data;
> + dev_dbg(rdev, "no compatible SoC found at root node\n");
> + } else {
> + soc_data = match->data;
> + }
>
Matching on the type of the root node is not great, as this
is both a layering violation and does not scale if you need
to do the same thing for future chip generations.
Normally this should be matched on the device compatible
string itself, or possibly based on one of its properties.
If this fails because there are already dtb files in the
open that have to keep getting supported and there is no
identifier in the fastrpc device itself, you can use
soc_device_match() as a last resort to match on the the
soc.
Arnd
next prev parent reply other threads:[~2025-10-15 7:10 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-15 4:56 [PATCH v2 0/3] Add ADSP and CDSP support on Kaanapali SoC Kumari Pallavi
2025-10-15 4:57 ` [PATCH v2 1/3] misc: fastrpc: Rename phys to dma_addr for clarity Kumari Pallavi
2025-10-15 7:20 ` Arnd Bergmann
2025-10-15 10:49 ` Kumari Pallavi
2025-10-15 10:07 ` Dmitry Baryshkov
2025-10-23 7:20 ` Kumari Pallavi
2025-10-15 4:57 ` [PATCH v2 2/3] misc: fastrpc: Add support for new DSP IOVA formatting Kumari Pallavi
2025-10-15 7:09 ` Arnd Bergmann [this message]
2025-10-15 8:52 ` Srinivas Kandagatla
2025-10-15 10:47 ` Kumari Pallavi
2025-10-18 17:25 ` Krzysztof Kozlowski
2025-10-18 17:24 ` Krzysztof Kozlowski
2025-10-23 8:35 ` Kumari Pallavi
2025-10-23 8:41 ` Krzysztof Kozlowski
2025-10-15 4:57 ` [PATCH v2 3/3] misc: fastrpc: Update dma_mask for CDSP support on Kaanapali SoC Kumari Pallavi
2025-10-15 7:06 ` Arnd Bergmann
2025-10-15 9:25 ` Srinivas Kandagatla
2025-10-15 10:47 ` Kumari Pallavi
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=ac42d5cc-1db9-4e81-8613-ca1ac9cff9d2@app.fastmail.com \
--to=arnd@arndb.de \
--cc=aiqun.yu@oss.qualcomm.com \
--cc=amahesh@qti.qualcomm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=ekansh.gupta@oss.qualcomm.com \
--cc=gregkh@linuxfoundation.org \
--cc=jingyi.wang@oss.qualcomm.com \
--cc=kpallavi@qti.qualcomm.com \
--cc=ktadakam@qti.qualcomm.com \
--cc=kumari.pallavi@oss.qualcomm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_bkumar@quicinc.com \
--cc=quic_chennak@quicinc.com \
--cc=srini@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: 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;
as well as URLs for NNTP newsgroup(s).