From: Fabio Estevam <festevam@gmail.com>
To: marex@denx.de
Cc: sbabic@denx.de, u-boot@lists.denx.de, Fabio Estevam <festevam@denx.de>
Subject: [PATCH 1/3] usb: ehci: mxs: Fix the USB node pointer retrieval
Date: Sat, 7 Oct 2023 18:56:46 -0300 [thread overview]
Message-ID: <20231007215648.3156877-1-festevam@gmail.com> (raw)
From: Fabio Estevam <festevam@denx.de>
Use dev_ofnode() to retrieve the USB node pointer from the udevice
structure.
This fixes the following build error:
drivers/usb/host/ehci-mxs.c:143:38: error: 'struct udevice' has no member named 'node_'
Signed-off-by: Fabio Estevam <festevam@denx.de>
---
drivers/usb/host/ehci-mxs.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/host/ehci-mxs.c b/drivers/usb/host/ehci-mxs.c
index 147b2fa145d6..092c79fd4bc5 100644
--- a/drivers/usb/host/ehci-mxs.c
+++ b/drivers/usb/host/ehci-mxs.c
@@ -136,11 +136,12 @@ static int ehci_usb_ofdata_to_platdata(struct udevice *dev)
struct usb_plat *plat = dev_get_plat(dev);
struct ehci_mxs_port *port = &priv->port;
u32 phandle, phy_reg, clk_reg, clk_id;
+ ofnode np = dev_ofnode(dev);
ofnode phy_node, clk_node;
const char *mode;
int ret;
- mode = ofnode_read_string(dev->node_, "dr_mode");
+ mode = ofnode_read_string(np, "dr_mode");
if (mode) {
if (strcmp(mode, "peripheral") == 0)
plat->init_type = USB_INIT_DEVICE;
@@ -151,12 +152,12 @@ static int ehci_usb_ofdata_to_platdata(struct udevice *dev)
}
/* Read base address of the USB IP block */
- ret = ofnode_read_u32(dev->node_, "reg", &port->usb_regs);
+ ret = ofnode_read_u32(np, "reg", &port->usb_regs);
if (ret)
return ret;
/* Read base address of the USB PHY IP block */
- ret = ofnode_read_u32(dev->node_, "fsl,usbphy", &phandle);
+ ret = ofnode_read_u32(np, "fsl,usbphy", &phandle);
if (ret)
return ret;
--
2.34.1
next reply other threads:[~2023-10-07 21:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-07 21:56 Fabio Estevam [this message]
2023-10-07 21:56 ` [PATCH 2/3] usb: ehci: mxs: Use regulator_set_enable_if_allowed() Fabio Estevam
2023-10-08 1:29 ` Marek Vasut
2023-10-07 21:56 ` [PATCH 3/3] mx28evk: Add USB Mass Storage support Fabio Estevam
2023-10-08 1:30 ` Marek Vasut
2023-10-08 1:28 ` [PATCH 1/3] usb: ehci: mxs: Fix the USB node pointer retrieval Marek Vasut
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=20231007215648.3156877-1-festevam@gmail.com \
--to=festevam@gmail.com \
--cc=festevam@denx.de \
--cc=marex@denx.de \
--cc=sbabic@denx.de \
--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