X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fusb%2Fhost%2Fehci-tegra.c;h=e3620da15fb13974a089834861d4d47d202b2aca;hb=4f892924d238cc415891dbea336a0fdaff2f853b;hp=31d54ab285bf01c9ea0e864559413f880868b46e;hpb=80cd58b99e8690b05e8537dbf76276e24fcfa652;p=oweals%2Fu-boot.git diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index 31d54ab285..e3620da15f 100644 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include #include @@ -600,9 +600,18 @@ static int init_ulpi_usb_controller(struct fdt_usb *config, /* reset ULPI phy */ if (dm_gpio_is_valid(&config->phy_reset_gpio)) { - dm_gpio_set_value(&config->phy_reset_gpio, 0); - mdelay(5); + /* + * This GPIO is typically active-low, and marked as such in + * device tree. dm_gpio_set_value() takes this into account + * and inverts the value we pass here if required. In other + * words, this first call logically asserts the reset signal, + * which typically results in driving the physical GPIO low, + * and the second call logically de-asserts the reset signal, + * which typically results in driver the GPIO high. + */ dm_gpio_set_value(&config->phy_reset_gpio, 1); + mdelay(5); + dm_gpio_set_value(&config->phy_reset_gpio, 0); } /* Reset the usb controller */ @@ -846,17 +855,6 @@ static int ehci_usb_probe(struct udevice *dev) plat->init_type); } -static int ehci_usb_remove(struct udevice *dev) -{ - int ret; - - ret = ehci_deregister(dev); - if (ret) - return ret; - - return 0; -} - static const struct udevice_id ehci_usb_ids[] = { { .compatible = "nvidia,tegra20-ehci", .data = USB_CTLR_T20 }, { .compatible = "nvidia,tegra30-ehci", .data = USB_CTLR_T30 }, @@ -871,7 +869,7 @@ U_BOOT_DRIVER(usb_ehci) = { .of_match = ehci_usb_ids, .ofdata_to_platdata = ehci_usb_ofdata_to_platdata, .probe = ehci_usb_probe, - .remove = ehci_usb_remove, + .remove = ehci_deregister, .ops = &ehci_usb_ops, .platdata_auto_alloc_size = sizeof(struct usb_platdata), .priv_auto_alloc_size = sizeof(struct fdt_usb),