From: Dominik Wild Date: Thu, 4 Feb 2021 12:33:15 +0100 Subject: [PATCH] usb: host: ehci-vf: Fix portnr initialization Message-ID: <20210204113315.1319084-1-dominik.wild@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- 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