From e4477e7954575201dd8a3f2d789b7d5ae2cf51d9 Mon Sep 17 00:00:00 2001 From: "Ying-Chun Liu (PaulLiu)" Date: Thu, 14 Jan 2021 14:54:06 +0800 Subject: Fix ehci-mx6 USB driver FTBFS on master branch. We fix the driver by fix the port to 0. This is wrong. We need to fix it later. The driver really needs to be re-written. Signed-off-by: Ying-Chun Liu (PaulLiu) --- drivers/usb/host/ehci-mx6.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c index 05afc8b5bf8..aa7148e214b 100644 --- a/drivers/usb/host/ehci-mx6.c +++ b/drivers/usb/host/ehci-mx6.c @@ -746,6 +746,7 @@ static int ehci_usb_bind(struct udevice *dev) * * dev->req_seq = (addr - USB_BASE_ADDR) / controller_spacing; */ + /* TODO: PaulLiu: We cannot use the code anymore. if (dev->req_seq == -1) { if (IS_ENABLED(CONFIG_MX6)) controller_spacing = 0x200; @@ -755,6 +756,7 @@ static int ehci_usb_bind(struct udevice *dev) dev->req_seq = (addr - USB_BASE_ADDR) / controller_spacing; } + */ return 0; } @@ -778,7 +780,7 @@ static int ehci_usb_probe(struct udevice *dev) } priv->ehci = ehci; - priv->portnr = dev->req_seq; + priv->portnr = 0; // TODO: PaulLiu: always set to 0 is wrong. /* Init usb board level according to the requested init type */ ret = board_usb_init(priv->portnr, type); @@ -843,13 +845,14 @@ static int ehci_usb_probe(struct udevice *dev) int ehci_usb_remove(struct udevice *dev) { struct ehci_mx6_priv_data *priv = dev_get_priv(dev); - struct usb_platdata *plat = dev_get_platdata(dev); + struct usb_platdata *plat = dev_get_plat(dev); ehci_deregister(dev); - plat->init_type = 0; /* Clean the requested usb type to host mode */ + //plat->init_type = 0; /* Clean the requested usb type to host mode */ - return board_usb_cleanup(dev->req_seq, priv->init_type); + /* TODO: PaulLiu: always assign port 0 is wrong */ + return board_usb_cleanup(0, priv->init_type); } static const struct udevice_id mx6_usb_ids[] = { -- cgit v1.2.3