summaryrefslogtreecommitdiff
path: root/drivers/usb/cdns3/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/cdns3/core.c')
-rw-r--r--drivers/usb/cdns3/core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/cdns3/core.c b/drivers/usb/cdns3/core.c
index 644a9791b9..b1ae3c7e65 100644
--- a/drivers/usb/cdns3/core.c
+++ b/drivers/usb/cdns3/core.c
@@ -113,6 +113,12 @@ static int cdns3_core_init_role(struct cdns3 *cdns)
dr_mode = usb_get_dr_mode(dev_ofnode(dev));
cdns->role = USB_ROLE_NONE;
+ if (dr_mode == USB_DR_MODE_UNKNOWN) {
+ ret = ofnode_read_u32(dev_ofnode(dev), "dr_num_mode" , &dr_mode);
+ if (ret)
+ return ret;
+ }
+
/*
* If driver can't read mode by means of usb_get_dr_mode function then
* chooses mode according with Kernel configuration. This setting