This driver is designed in a generic manner, so resets should be
handled generically as well.

Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com>
---

 drivers/usb/host/ehci-generic.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/usb/host/ehci-generic.c b/drivers/usb/host/ehci-generic.c
index e0377ca..34d9f71 100644
--- a/drivers/usb/host/ehci-generic.c
+++ b/drivers/usb/host/ehci-generic.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <clk.h>
+#include <reset.h>
 #include <asm/io.h>
 #include <dm.h>
 #include "ehci.h"
@@ -37,6 +38,18 @@ static int ehci_usb_probe(struct udevice *dev)
                clk_free(&clk);
        }
 
+       for (i = 0; ; i++) {
+               struct reset_ctl reset;
+               int ret;
+
+               ret = reset_get_by_index(dev, i, &reset);
+               if (ret < 0)
+                       break;
+               if (reset_deassert(&reset))
+                       printf("failed to deassert reset %d\n", i);
+               reset_free(&reset);
+       }
+
        hccr = map_physmem(dev_get_addr(dev), 0x100, MAP_NOCACHE);
        hcor = (struct ehci_hcor *)((uintptr_t)hccr +
                                    HC_LENGTH(ehci_readl(&hccr->cr_capbase)));
-- 
1.9.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to