[PATCH v2 3/5] usb: dwc2: add reset controller dependency for probe via oftree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The dwc2 controller is connected to one reset controller which needs to be
triggered before it is able to operate. This patch adds the referenced reset
controller in the devicetree to be used.

Signed-off-by: Michael Grzeschik <m.grzeschik@xxxxxxxxxxxxxx>
---
 drivers/usb/dwc2/dwc2.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/usb/dwc2/dwc2.c b/drivers/usb/dwc2/dwc2.c
index 13455479ef..6f5127fc3b 100644
--- a/drivers/usb/dwc2/dwc2.c
+++ b/drivers/usb/dwc2/dwc2.c
@@ -12,6 +12,7 @@
 #include <errno.h>
 #include <driver.h>
 #include <linux/clk.h>
+#include <linux/reset.h>
 
 #include "dwc2.h"
 
@@ -61,6 +62,10 @@ static int dwc2_probe(struct device_d *dev)
 	if (ret)
 		goto clk_put;
 
+	ret = device_reset_us(dev, 2);
+	if (ret)
+		goto clk_disable;
+
 	dwc2->phy = phy_optional_get(dev, "usb2-phy");
 	if (IS_ERR(dwc2->phy)) {
 		ret = PTR_ERR(dwc2->phy);
-- 
2.29.2


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux