mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH master 1/2] dma: fix fixup warning for SoCs without /soc node
Date: Thu, 16 Jan 2025 15:11:47 +0100	[thread overview]
Message-ID: <20250116141148.301230-1-a.fatoum@pengutronix.de> (raw)

For SoCs without a /soc node, any DMA coherency fixups happen at the
device tree root. The root's full name is an empty string in barebox, so
this expectedly fails.

Handle this case specially.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/dma/of_fixups.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/dma/of_fixups.c b/drivers/dma/of_fixups.c
index 084ab94cc71c..7377c508cfda 100644
--- a/drivers/dma/of_fixups.c
+++ b/drivers/dma/of_fixups.c
@@ -16,7 +16,8 @@ static int of_dma_coherent_fixup(struct device_node *root, void *data)
 	else
 		coherency = DEV_DMA_COHERENCE_DEFAULT;
 
-	soc_kernel = of_find_node_by_path_from(root, soc_bb->full_name);
+	soc_kernel = of_find_node_by_path_from(root,
+		       *soc_bb->full_name ? soc_bb->full_name : "/");
 	if (!soc_kernel)
 		return -ENOENT;
 
-- 
2.39.5




             reply	other threads:[~2025-01-16 14:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-16 14:11 Ahmad Fatoum [this message]
2025-01-16 14:11 ` [PATCH master 2/2] kbuild: remove stale references to README Ahmad Fatoum
2025-01-21  8:22 ` [PATCH master 1/2] dma: fix fixup warning for SoCs without /soc node Sascha Hauer

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=20250116141148.301230-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.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