This change will get "maximum-speed" from dtb if exist and set USB speed
accordingly for Agilex and Stratix10 platform.

Signed-off-by: Liwei Song <liwei.s...@windriver.com>
---
 drivers/usb/dwc2/params.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c
index 8eab5f38b110..37e367154713 100644
--- a/drivers/usb/dwc2/params.c
+++ b/drivers/usb/dwc2/params.c
@@ -96,9 +96,13 @@ static void dwc2_set_s3c6400_params(struct dwc2_hsotg *hsotg)
 static void dwc2_set_socfpga_agilex_params(struct dwc2_hsotg *hsotg)
 {
        struct dwc2_core_params *p = &hsotg->params;
+       u32 max_speed;
 
        p->power_down = DWC2_POWER_DOWN_PARAM_NONE;
        p->no_clock_gating = true;
+       max_speed = usb_get_maximum_speed(hsotg->dev);
+       if (max_speed)
+               p->speed = max_speed;
 }
 
 static void dwc2_set_rk_params(struct dwc2_hsotg *hsotg)
-- 
2.40.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13895): 
https://lists.yoctoproject.org/g/linux-yocto/message/13895
Mute This Topic: https://lists.yoctoproject.org/mt/105956886/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to