]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
usb: dwc3: Update REFCLK_FLADJ for frame length adjustment
authorAshok Reddy Soma <ashok.reddy.soma@xilinx.com>
Wed, 10 Nov 2021 13:58:00 +0000 (06:58 -0700)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 15 Nov 2021 13:38:40 +0000 (14:38 +0100)
Remove unwanted condition check for frame length adjustment.

For ZynqMP / Versal the ref clk is set to 20Mhz frequency and it is always
recommended. For 20Mhz frequency the refclk_fladj value should be 0, so
clear bits 21:8 in GFLADJ register.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
drivers/usb/dwc3/dwc3-generic.c

index 95baa067eff7a985bede68297eda4ad515343090..565b502744b9ec7912cb49ce66483913a147ac19 100644 (file)
@@ -66,13 +66,8 @@ static void dwc3_frame_length_adjustment(struct udevice *dev, struct dwc3 *dwc)
 
        refclk_fladj = dev_read_bool(dev, "snps,refclk_fladj");
 
-       if (refclk_fladj) {
-               if ((reg & GFLADJ_REFCLK_FLADJ) != (fladj &
-                                       GFLADJ_REFCLK_FLADJ)) {
-                       reg &= ~GFLADJ_REFCLK_FLADJ;
-                       reg |= (fladj & GFLADJ_REFCLK_FLADJ);
-               }
-       }
+       if (refclk_fladj)
+               reg &= ~GFLADJ_REFCLK_FLADJ;
 
        if ((reg & GFLADJ_30MHZ_MASK) != fladj) {
                reg &= ~GFLADJ_30MHZ_MASK;