mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Junhui Liu" <junhui.liu@pigmoral.tech>
To: "Krzysztof Kozlowski" <krzk@kernel.org>,
	 "Bjorn Andersson" <andersson@kernel.org>,
	 "Mathieu Poirier" <mathieu.poirier@linaro.org>,
	 "Rob Herring" <robh@kernel.org>,
	 "Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	 "Conor Dooley" <conor+dt@kernel.org>,
	 "Chen Wang" <unicorn_wang@outlook.com>,
	 "Inochi Amaoto" <inochiama@gmail.com>,
	 "Philipp Zabel" <p.zabel@pengutronix.de>,
	 "Paul Walmsley" <paul.walmsley@sifive.com>,
	 "Palmer Dabbelt" <palmer@dabbelt.com>,
	"Albert Ou" <aou@eecs.berkeley.edu>,
	 "Alexandre Ghiti" <alex@ghiti.fr>
Cc: <linux-remoteproc@vger.kernel.org>, <devicetree@vger.kernel.org>,
	 <sophgo@lists.linux.dev>, <linux-kernel@vger.kernel.org>,
	 <linux-riscv@lists.infradead.org>
Subject: Re: [PATCH v2 2/2] drivers: remoteproc: Add C906L controller for Sophgo CV1800B SoC
Date: Wed, 30 Jul 2025 09:27:55 +0000	[thread overview]
Message-ID: <1856fd5bd24fbc18.7164ab65bf64e5c2.99b72db93ceee539@Jude-Air.local> (raw)
In-Reply-To: <8a4ba1b1-0960-4433-b183-59c99157b0e2@kernel.org>

On 30/07/2025 08:46, Krzysztof Kozlowski wrote:
> On 28/07/2025 13:03, Junhui Liu wrote:
>> +
>> +static int cv1800b_c906l_mem_alloc(struct rproc *rproc,
>> +				   struct rproc_mem_entry *mem)
>> +{
>> +	void __iomem *va;
>> +
>> +	va = ioremap_wc(mem->dma, mem->len);
>> +	if (!va)
>> +		return -ENOMEM;
>> +
>> +	/* Update memory entry va */
>> +	mem->va = (void *)va;
>> +
>> +	return 0;
>> +}
>> +
>> +static int cv1800b_c906l_mem_release(struct rproc *rproc,
>> +				     struct rproc_mem_entry *mem)
>> +{
>> +	iounmap((void __iomem *)mem->va);
>> +	return 0;
>> +}
>> +
>> +static int cv1800b_c906l_add_carveout(struct rproc *rproc)
>> +{
>> +	struct device *dev = rproc->dev.parent;
>> +	struct device_node *np = dev->of_node;
>> +	struct of_phandle_iterator it;
>> +	struct rproc_mem_entry *mem;
>> +	struct reserved_mem *rmem;
>> +	int i = 0;
>> +
>> +	/* Register associated reserved memory regions */
>> +	of_phandle_iterator_init(&it, np, "memory-region", NULL, 0);
>> +	while (of_phandle_iterator_next(&it) == 0) {
>> +		rmem = of_reserved_mem_lookup(it.node);
>> +		if (!rmem) {
>> +			of_node_put(it.node);
>> +			return -EINVAL;
>> +		}
>> +
>> +		if (!strcmp(it.node->name, "vdev0buffer")) {
> 
> Why are you adding undocumented ABI? And so hidden, not even using
> standard OF API!
> 
> How does this behaves when I change your DTS to call it
> "whateverbuffer"? Does it work? Obviously not.
> 
> No, stop doing that.

Yes, you're right. I will consider introducing a "memory-region-names"
property in the bindings, instead of relying on the node labels directly.

-- 
Best regards,
Junhui Liu


  reply	other threads:[~2025-07-30  9:28 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-28 11:03 [PATCH v2 0/2] remoteproc: cv1800b: Add initial support for C906L processor Junhui Liu
2025-07-28 11:03 ` [PATCH v2 1/2] dt-bindings: remoteproc: Add C906L rproc for Sophgo CV1800B SoC Junhui Liu
2025-07-28 13:11   ` Krzysztof Kozlowski
2025-07-28 17:13     ` Junhui Liu
2025-07-29  6:27       ` Krzysztof Kozlowski
2025-07-30  3:31         ` Junhui Liu
2025-07-30  6:47           ` Krzysztof Kozlowski
2025-07-30  9:52             ` Junhui Liu
2025-07-29  8:31   ` Inochi Amaoto
2025-07-30  3:57     ` Junhui Liu
2025-07-30  6:05       ` Inochi Amaoto
2025-07-30  8:59         ` Junhui Liu
2025-07-30 22:47           ` Inochi Amaoto
2025-07-28 11:03 ` [PATCH v2 2/2] drivers: remoteproc: Add C906L controller " Junhui Liu
2025-07-29 11:11   ` kernel test robot
2025-07-30  6:46   ` Krzysztof Kozlowski
2025-07-30  9:27     ` Junhui Liu [this message]
2025-07-30  9:35       ` Krzysztof Kozlowski
2025-07-30 10:00         ` Junhui Liu

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=1856fd5bd24fbc18.7164ab65bf64e5c2.99b72db93ceee539@Jude-Air.local \
    --to=junhui.liu@pigmoral.tech \
    --cc=alex@ghiti.fr \
    --cc=andersson@kernel.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=inochiama@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=p.zabel@pengutronix.de \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=robh@kernel.org \
    --cc=sophgo@lists.linux.dev \
    --cc=unicorn_wang@outlook.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®