U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
To: u-boot@lists.denx.de
Cc: Jerome Forissier <jerome.forissier@arm.com>,
	 Tom Rini <trini@konsulko.com>,
	Peter Robinson <pbrobinson@gmail.com>,
	 Svyatoslav Ryhel <clamor95@gmail.com>,
	Heiko Schocher <hs@nabladev.com>,  Simon Glass <sjg@chromium.org>,
	Marek Vasut <marek.vasut+usb@mailbox.org>,
	 Andrew Goodbody <andrew.goodbody@linaro.org>,
	 Rasmus Villemoes <ravi@prevas.dk>, Peng Fan <peng.fan@nxp.com>
Subject: [PATCH 5/6] net: mvpp2: Use dev_read_addr_index_ptr()
Date: Tue, 26 May 2026 15:25:14 +0800	[thread overview]
Message-ID: <20260526-devfdt-net-v1-5-be3597b85b5e@nxp.com> (raw)
In-Reply-To: <20260526-devfdt-net-v1-0-be3597b85b5e@nxp.com>

From: Peng Fan <peng.fan@nxp.com>

Use dev_read_addr_index_ptr() which supports both live device tree and
flat DT backends, avoiding direct dependency on devfdt_* helpers.

No functional changes.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 drivers/net/mvpp2.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c
index f9e979c4d58..193f82ea07d 100644
--- a/drivers/net/mvpp2.c
+++ b/drivers/net/mvpp2.c
@@ -5296,16 +5296,16 @@ static int mvpp2_base_probe(struct udevice *dev)
 	}
 
 	/* Save base addresses for later use */
-	priv->base = devfdt_get_addr_index_ptr(dev, 0);
+	priv->base = dev_read_addr_index_ptr(dev, 0);
 	if (!priv->base)
 		return -EINVAL;
 
 	if (priv->hw_version == MVPP21) {
-		priv->lms_base = devfdt_get_addr_index_ptr(dev, 1);
+		priv->lms_base = dev_read_addr_index_ptr(dev, 1);
 		if (!priv->lms_base)
 			return -EINVAL;
 	} else {
-		priv->iface_base = devfdt_get_addr_index_ptr(dev, 1);
+		priv->iface_base = dev_read_addr_index_ptr(dev, 1);
 		if (!priv->iface_base)
 			return -EINVAL;
 
@@ -5346,8 +5346,7 @@ static int mvpp2_probe(struct udevice *dev)
 	if (priv->hw_version == MVPP21) {
 		int priv_common_regs_num = 2;
 
-		port->base = devfdt_get_addr_index_ptr(
-			dev->parent, priv_common_regs_num + port->id);
+		port->base = dev_read_addr_index_ptr(dev->parent, priv_common_regs_num + port->id);
 		if (!port->base)
 			return -EINVAL;
 	} else {

-- 
2.51.0


  parent reply	other threads:[~2026-05-26  6:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-26  7:25 [PATCH 0/6] net: Use dev APIs Peng Fan (OSS)
2026-05-26  7:25 ` [PATCH 1/6] net: ethoc: Use dev_read_addr_index() Peng Fan (OSS)
2026-05-27  1:17   ` Simon Glass
2026-05-26  7:25 ` [PATCH 2/6] net: qe: dm_qe_uec: Use dev_read_addr() Peng Fan (OSS)
2026-05-27  1:17   ` Simon Glass
2026-05-26  7:25 ` [PATCH 3/6] net: calxedaxgmac: " Peng Fan (OSS)
2026-05-27  1:17   ` Simon Glass
2026-05-26  7:25 ` [PATCH 4/6] net: dc2114x: Use dev_remap_addr() Peng Fan (OSS)
2026-05-27  1:17   ` Simon Glass
2026-05-26  7:25 ` Peng Fan (OSS) [this message]
2026-05-27  1:17   ` [PATCH 5/6] net: mvpp2: Use dev_read_addr_index_ptr() Simon Glass
2026-05-26  7:25 ` [PATCH 6/6] net: mvpp2: convert FDT access to ofnode API Peng Fan (OSS)
2026-05-27  1:20   ` Simon Glass
2026-05-27 14:29     ` Peng Fan (OSS)
2026-05-27 14:47       ` Tom Rini

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=20260526-devfdt-net-v1-5-be3597b85b5e@nxp.com \
    --to=peng.fan@oss.nxp.com \
    --cc=andrew.goodbody@linaro.org \
    --cc=clamor95@gmail.com \
    --cc=hs@nabladev.com \
    --cc=jerome.forissier@arm.com \
    --cc=marek.vasut+usb@mailbox.org \
    --cc=pbrobinson@gmail.com \
    --cc=peng.fan@nxp.com \
    --cc=ravi@prevas.dk \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /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