All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Wu <david.wu@rock-chips.com>
To: u-boot@lists.denx.de
Subject: [RESEND PATCH v2 01/11] net: dwc_eth_qos: Use dev_ functions calls to get FDT data
Date: Tue, 12 May 2020 17:56:00 +0800	[thread overview]
Message-ID: <20200512095603.29126-2-david.wu@rock-chips.com> (raw)
In-Reply-To: <20200512095603.29126-1-david.wu@rock-chips.com>

It seems dev_ functions are more general than fdt_ functions.

Signed-off-by: David Wu <david.wu@rock-chips.com>
---

Changes in v2:
- None

 drivers/net/dwc_eth_qos.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c
index f67c5f4570..66a02aa80b 100644
--- a/drivers/net/dwc_eth_qos.c
+++ b/drivers/net/dwc_eth_qos.c
@@ -1889,8 +1889,7 @@ static phy_interface_t eqos_get_interface_stm32(struct udevice *dev)
 
 	debug("%s(dev=%p):\n", __func__, dev);
 
-	phy_mode = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), "phy-mode",
-			       NULL);
+	phy_mode = dev_read_string(dev, "phy-mode");
 	if (phy_mode)
 		interface = phy_get_interface_by_name(phy_mode);
 
@@ -1991,9 +1990,9 @@ static int eqos_probe(struct udevice *dev)
 	eqos->dev = dev;
 	eqos->config = (void *)dev_get_driver_data(dev);
 
-	eqos->regs = devfdt_get_addr(dev);
+	eqos->regs = dev_read_addr(dev);
 	if (eqos->regs == FDT_ADDR_T_NONE) {
-		pr_err("devfdt_get_addr() failed");
+		pr_err("dev_read_addr() failed");
 		return -ENODEV;
 	}
 	eqos->mac_regs = (void *)(eqos->regs + EQOS_MAC_REGS_BASE);
-- 
2.19.1

  reply	other threads:[~2020-05-12  9:56 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-12  9:55 [RESEND PATCH v2 00/11] Add dwc_eth_qos support for rockchip David Wu
2020-05-12  9:56 ` David Wu [this message]
2020-05-13  8:09   ` [RESEND PATCH v2 01/11] net: dwc_eth_qos: Use dev_ functions calls to get FDT data Patrice CHOTARD
2020-05-13 12:58   ` Patrick DELAUNAY
2020-05-13 13:01     ` Marek Vasut
2020-05-12  9:56 ` [RESEND PATCH v2 02/11] net: dwc_eth_qos: Add option "snps, reset-gpio" phy-rst gpio for stm32 David Wu
2020-05-13  8:29   ` [RESEND PATCH v2 02/11] net: dwc_eth_qos: Add option "snps,reset-gpio" " Patrice CHOTARD
2020-05-13 12:55   ` Patrick DELAUNAY
2020-06-15  3:55     ` David Wu
2020-06-12 14:48   ` [RESEND PATCH v2 02/11] net: dwc_eth_qos: Add option "snps, reset-gpio" " Tom Rini
2020-06-15  7:54     ` David Wu
2020-05-12  9:56 ` [RESEND PATCH v2 03/11] net: dwc_eth_qos: Move interface() to eqos_ops structure David Wu
2020-05-13  8:31   ` Patrice CHOTARD
2020-05-12  9:56 ` [RESEND PATCH v2 04/11] net: dwc_eth_qos: Make clk_rx and clk_tx optional David Wu
2020-05-13  8:34   ` Patrice CHOTARD
2020-05-13 13:17   ` Patrick DELAUNAY
2020-05-13 13:53     ` Marek Vasut
2020-06-08  9:29       ` Patrick DELAUNAY
2020-06-08  9:45         ` Marek Vasut
2020-06-08 17:05           ` Patrick DELAUNAY
2020-06-08 17:14             ` Marek Vasut
2020-05-12  9:57 ` [RESEND PATCH v2 05/11] net: dwc_eth_qos: Split eqos_start() to get link speed David Wu
2020-05-13  8:43   ` Patrice CHOTARD
2020-05-12  9:57 ` [RESEND PATCH v2 06/11] net: dwc_eth_qos: make eqos_start_clks and eqos_stop_clks optional David Wu
2020-05-13  8:44   ` Patrice CHOTARD
2020-05-12  9:57 ` [RESEND PATCH v2 07/11] net: dwc_eth_qos: Export common struct and interface at head file David Wu
2020-05-13  8:45   ` Patrice CHOTARD
2020-05-12  9:58 ` [RESEND PATCH v2 08/11] net: gmac_rockchip: Add dwc_eth_qos support David Wu
2020-05-12  9:58 ` [RESEND PATCH v2 09/11] net: dwc_eth_qos: Add eqos_rockchip_ops David Wu
2020-05-13  8:47   ` Patrice CHOTARD
2020-05-12  9:58 ` [RESEND PATCH v2 10/11] net: dwc_eth_qos: Add EQOS_MAC_MDIO_ADDRESS_CR_100_150 for Rockchip David Wu
2020-05-13  8:47   ` Patrice CHOTARD
2020-05-12  9:59 ` [RESEND PATCH v2 11/11] net: gmac_rockchip: Add RV1126 gmac support David Wu

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=20200512095603.29126-2-david.wu@rock-chips.com \
    --to=david.wu@rock-chips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.