The branch stable/13 has been updated by manu:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=181feb34605c3b711fda0e463ef48ead9eec059d

commit 181feb34605c3b711fda0e463ef48ead9eec059d
Author:     Emmanuel Vadot <[email protected]>
AuthorDate: 2022-11-16 10:57:56 +0000
Commit:     Emmanuel Vadot <[email protected]>
CommitDate: 2023-02-02 11:19:08 +0000

    usb/dwc3: Use more () for macros variables
    
    Suggested by:   andrew
    Sponsored by:   Beckhoff Automation GmbH & Co. KG
    
    (cherry picked from commit 0860c27fe8cf144cb10f8916a0b8fe5ad57a3d9e)
---
 sys/dev/usb/controller/dwc3.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/sys/dev/usb/controller/dwc3.h b/sys/dev/usb/controller/dwc3.h
index c69672072209..72420890d28c 100644
--- a/sys/dev/usb/controller/dwc3.h
+++ b/sys/dev/usb/controller/dwc3.h
@@ -99,7 +99,7 @@
 #define         DWC3_GUSB2PHYCFG0_USBTRDTIM_8BITS      9
 #define         DWC3_GUSB2PHYCFG0_USBTRDTIM_16BITS     5
 #define         DWC3_GUSB2PHYCFG0_ENBLSLPM             (1 << 8)
-#define         DWC3_GUSB2PHYCFG0_PHYSEL(x)            ((x >> 7) & 0x1)        
/* 0 = USB2.0, 1 = USB1.1 */
+#define         DWC3_GUSB2PHYCFG0_PHYSEL(x)            (((x) >> 7) & 0x1)      
/* 0 = USB2.0, 1 = USB1.1 */
 #define         DWC3_GUSB2PHYCFG0_SUSPENDUSB20         (1 << 6)
 #define         DWC3_GUSB2PHYCFG0_ULPI_UTMI_SEL        (1 << 4)
 #define         DWC3_GUSB2PHYCFG0_PHYIF                (1 << 3)
@@ -110,6 +110,11 @@
 #define         DWC3_GUSB3PIPECTL0_DELAYP1TRANS        (1 << 18)
 #define         DWC3_GUSB3PIPECTL0_SUSPENDUSB3         (1 << 17)
 
+#define        DWC3_HWPARAMS3_SSPHY(x)                 ((x) & 0x3)
+#define         DWC3_HWPARAMS3_SSPHY_DISABLE           0
+#define         DWC3_HWPARAMS3_SSPHY_GEN1              1
+#define         DWC3_HWPARAMS3_SSPHY_GEN2              2
+
 #define        DWC3_GTXFIFOSIZ(x)      (0xc300 + 0x4 * (x))
 #define        DWC3_GRXFIFOSIZ(x)      (0xc380 + 0x4 * (x))
 #define        DWC3_GEVNTADRLO0                0xc400

Reply via email to