[PATCH] usb: host: ehci-vf: Fix portnr initialization
Dominik Wild
dominik.wild at gmail.com
Thu Feb 4 12:33:15 CET 2021
As of 29f7d05a347ab7a42577c67fdfb787ef91537302 dev->seq will be set
after device_ofdata_to_platdata(), therefore dev->seq must be read
later during probe
Signed-off-by: Dominik Wild <dominik.wild at gmail.com>
---
drivers/usb/host/ehci-vf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/host/ehci-vf.c b/drivers/usb/host/ehci-vf.c
index 25f76c9fa9..4dac940d08 100644
--- a/drivers/usb/host/ehci-vf.c
+++ b/drivers/usb/host/ehci-vf.c
@@ -222,8 +222,6 @@ static int vf_usb_of_to_plat(struct udevice *dev)
int node = dev_of_offset(dev);
const char *mode;
- priv->portnr = dev_seq(dev);
-
priv->ehci = dev_read_addr_ptr(dev);
mode = fdt_getprop(dt_blob, node, "dr_mode", NULL);
if (mode) {
@@ -317,6 +315,8 @@ static int ehci_usb_probe(struct udevice *dev)
struct ehci_hcor *hcor;
int ret;
+ priv->portnr = dev_seq(dev);
+
ret = ehci_vf_common_init(ehci, priv->portnr);
if (ret)
return ret;
--
2.25.1
More information about the U-Boot
mailing list