Merge tag 'u-boot-atmel-fixes-2020.07-a' of https://gitlab.denx.de/u-boot/custodians...
[oweals/u-boot.git] / drivers / usb / host / ehci-zynq.c
index 76642cdad7de1b05b740cd3a505b62f7e4f803eb..939c30999eeb18b24f7a9273520491e731675b0d 100644 (file)
@@ -1,9 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2014, Xilinx, Inc
  *
  * USB Low level initialization(Specific to zynq)
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -26,7 +25,7 @@ static int ehci_zynq_ofdata_to_platdata(struct udevice *dev)
 {
        struct zynq_ehci_priv *priv = dev_get_priv(dev);
 
-       priv->ehci = (struct usb_ehci *)dev_get_addr_ptr(dev);
+       priv->ehci = (struct usb_ehci *)devfdt_get_addr_ptr(dev);
        if (!priv->ehci)
                return -EINVAL;
 
@@ -73,17 +72,6 @@ static int ehci_zynq_probe(struct udevice *dev)
        return ehci_register(dev, hccr, hcor, NULL, 0, plat->init_type);
 }
 
-static int ehci_zynq_remove(struct udevice *dev)
-{
-       int ret;
-
-       ret = ehci_deregister(dev);
-       if (ret)
-               return ret;
-
-       return 0;
-}
-
 static const struct udevice_id ehci_zynq_ids[] = {
        { .compatible = "xlnx,zynq-usb-2.20a" },
        { }
@@ -95,7 +83,7 @@ U_BOOT_DRIVER(ehci_zynq) = {
        .of_match = ehci_zynq_ids,
        .ofdata_to_platdata = ehci_zynq_ofdata_to_platdata,
        .probe = ehci_zynq_probe,
-       .remove = ehci_zynq_remove,
+       .remove = ehci_deregister,
        .ops    = &ehci_usb_ops,
        .platdata_auto_alloc_size = sizeof(struct usb_platdata),
        .priv_auto_alloc_size = sizeof(struct zynq_ehci_priv),