summaryrefslogtreecommitdiffstats
path: root/include/linux/usb
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-09-02 13:20:57 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-09-02 13:20:57 -0400
commit96e46dcfb8534494859936b3da4f3018de53a53f (patch)
tree1341f4390933909c97a77be3cdbaf403b3f04bd8 /include/linux/usb
parentb2fcb285ade36c2339ee6638223a65829ee9907f (diff)
parent18a93cd38be3e69ac5b067c570a78a369b79e31d (diff)
Merge tag 'usb-for-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next
Felipe writes: USB: Changes for v5.4 merge window With only 45 non-merge commits, we have a small merge window from the Gadget perspective. The biggest change here is the addition of the Cadence USB3 DRD Driver. All other changes are small, non-critical fixes or smaller new features like the improvement to BESL handling in dwc3. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> * tag 'usb-for-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb: (45 commits) usb: gadget: net2280: Add workaround for AB chip Errata 11 usb: gadget: net2280: Move all "ll" registers in one structure usb: dwc3: gadget: Workaround Mirosoft's BESL check usb:cdns3 Fix for stuck packets in on-chip OUT buffer. usb: cdns3: Add Cadence USB3 DRD Driver usb: common: Simplify usb_decode_get_set_descriptor function. usb: common: Patch simplify usb_decode_set_clear_feature function. usb: common: Separated decoding functions from dwc3 driver. dt-bindings: add binding for USBSS-DRD controller. usb: gadget: composite: Set recommended BESL values usb: dwc3: gadget: Set BESL config parameter usb: dwc3: Separate field holding multiple properties usb: gadget: Export recommended BESL values usb: phy: phy-fsl-usb: Make structure fsl_otg_initdata constant usb: udc: lpc32xx: silence fall-through warning usb: dwc3: meson-g12a: fix suspend resume regulator unbalanced disables usb: udc: lpc32xx: remove set but not used 3 variables usb: gadget: udc: core: Fix segfault if udc_bind_to_driver() for pending driver fails usb: dwc3: st: Add of_dev_put() in probe function usb: dwc3: st: Add of_node_put() before return in probe function ...
Diffstat (limited to 'include/linux/usb')
-rw-r--r--include/linux/usb/ch9.h27
-rw-r--r--include/linux/usb/gadget.h3
-rw-r--r--include/linux/usb/hcd.h4
-rw-r--r--include/linux/usb/usb338x.h35
4 files changed, 59 insertions, 10 deletions
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h
index da82606be605..58b83066bea4 100644
--- a/include/linux/usb/ch9.h
+++ b/include/linux/usb/ch9.h
@@ -70,4 +70,31 @@ extern enum usb_device_speed usb_get_maximum_speed(struct device *dev);
70 */ 70 */
71extern const char *usb_state_string(enum usb_device_state state); 71extern const char *usb_state_string(enum usb_device_state state);
72 72
73#ifdef CONFIG_TRACING
74/**
75 * usb_decode_ctrl - Returns human readable representation of control request.
76 * @str: buffer to return a human-readable representation of control request.
77 * This buffer should have about 200 bytes.
78 * @size: size of str buffer.
79 * @bRequestType: matches the USB bmRequestType field
80 * @bRequest: matches the USB bRequest field
81 * @wValue: matches the USB wValue field (CPU byte order)
82 * @wIndex: matches the USB wIndex field (CPU byte order)
83 * @wLength: matches the USB wLength field (CPU byte order)
84 *
85 * Function returns decoded, formatted and human-readable description of
86 * control request packet.
87 *
88 * The usage scenario for this is for tracepoints, so function as a return
89 * use the same value as in parameters. This approach allows to use this
90 * function in TP_printk
91 *
92 * Important: wValue, wIndex, wLength parameters before invoking this function
93 * should be processed by le16_to_cpu macro.
94 */
95extern const char *usb_decode_ctrl(char *str, size_t size, __u8 bRequestType,
96 __u8 bRequest, __u16 wValue, __u16 wIndex,
97 __u16 wLength);
98#endif
99
73#endif /* __LINUX_USB_CH9_H */ 100#endif /* __LINUX_USB_CH9_H */
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index fb19141151d8..124462d65eac 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -291,6 +291,9 @@ struct usb_dcd_config_params {
291#define USB_DEFAULT_U1_DEV_EXIT_LAT 0x01 /* Less then 1 microsec */ 291#define USB_DEFAULT_U1_DEV_EXIT_LAT 0x01 /* Less then 1 microsec */
292 __le16 bU2DevExitLat; /* U2 Device exit Latency */ 292 __le16 bU2DevExitLat; /* U2 Device exit Latency */
293#define USB_DEFAULT_U2_DEV_EXIT_LAT 0x1F4 /* Less then 500 microsec */ 293#define USB_DEFAULT_U2_DEV_EXIT_LAT 0x1F4 /* Less then 500 microsec */
294 __u8 besl_baseline; /* Recommended baseline BESL (0-15) */
295 __u8 besl_deep; /* Recommended deep BESL (0-15) */
296#define USB_DEFAULT_BESL_UNSPECIFIED 0xFF /* No recommended value */
294}; 297};
295 298
296 299
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h
index 8d3869c7de85..712b2a603645 100644
--- a/include/linux/usb/hcd.h
+++ b/include/linux/usb/hcd.h
@@ -597,6 +597,10 @@ extern void usb_ep0_reinit(struct usb_device *);
597#define GetPortStatus HUB_CLASS_REQ(USB_DIR_IN, USB_RT_PORT, USB_REQ_GET_STATUS) 597#define GetPortStatus HUB_CLASS_REQ(USB_DIR_IN, USB_RT_PORT, USB_REQ_GET_STATUS)
598#define SetHubFeature HUB_CLASS_REQ(USB_DIR_OUT, USB_RT_HUB, USB_REQ_SET_FEATURE) 598#define SetHubFeature HUB_CLASS_REQ(USB_DIR_OUT, USB_RT_HUB, USB_REQ_SET_FEATURE)
599#define SetPortFeature HUB_CLASS_REQ(USB_DIR_OUT, USB_RT_PORT, USB_REQ_SET_FEATURE) 599#define SetPortFeature HUB_CLASS_REQ(USB_DIR_OUT, USB_RT_PORT, USB_REQ_SET_FEATURE)
600#define ClearTTBuffer HUB_CLASS_REQ(USB_DIR_OUT, USB_RT_PORT, HUB_CLEAR_TT_BUFFER)
601#define ResetTT HUB_CLASS_REQ(USB_DIR_OUT, USB_RT_PORT, HUB_RESET_TT)
602#define GetTTState HUB_CLASS_REQ(USB_DIR_IN, USB_RT_PORT, HUB_GET_TT_STATE)
603#define StopTT HUB_CLASS_REQ(USB_DIR_OUT, USB_RT_PORT, HUB_STOP_TT)
600 604
601 605
602/*-------------------------------------------------------------------------*/ 606/*-------------------------------------------------------------------------*/
diff --git a/include/linux/usb/usb338x.h b/include/linux/usb/usb338x.h
index 7189e3387bf9..20020c1336d5 100644
--- a/include/linux/usb/usb338x.h
+++ b/include/linux/usb/usb338x.h
@@ -113,7 +113,10 @@ struct usb338x_ll_regs {
113 u32 ll_ltssm_ctrl1; 113 u32 ll_ltssm_ctrl1;
114 u32 ll_ltssm_ctrl2; 114 u32 ll_ltssm_ctrl2;
115 u32 ll_ltssm_ctrl3; 115 u32 ll_ltssm_ctrl3;
116 u32 unused[2]; 116 u32 unused1;
117
118 /* 0x710 */
119 u32 unused2;
117 u32 ll_general_ctrl0; 120 u32 ll_general_ctrl0;
118 u32 ll_general_ctrl1; 121 u32 ll_general_ctrl1;
119#define PM_U3_AUTO_EXIT 29 122#define PM_U3_AUTO_EXIT 29
@@ -136,29 +139,41 @@ struct usb338x_ll_regs {
136 u32 ll_general_ctrl2; 139 u32 ll_general_ctrl2;
137#define SELECT_INVERT_LANE_POLARITY 7 140#define SELECT_INVERT_LANE_POLARITY 7
138#define FORCE_INVERT_LANE_POLARITY 6 141#define FORCE_INVERT_LANE_POLARITY 6
142
143 /* 0x720 */
139 u32 ll_general_ctrl3; 144 u32 ll_general_ctrl3;
140 u32 ll_general_ctrl4; 145 u32 ll_general_ctrl4;
141 u32 ll_error_gen; 146 u32 ll_error_gen;
142} __packed; 147 u32 unused3;
148
149 /* 0x730 */
150 u32 unused4[4];
143 151
144struct usb338x_ll_lfps_regs { 152 /* 0x740 */
145 /* offset 0x748 */ 153 u32 unused5[2];
146 u32 ll_lfps_5; 154 u32 ll_lfps_5;
147#define TIMER_LFPS_6US 16 155#define TIMER_LFPS_6US 16
148 u32 ll_lfps_6; 156 u32 ll_lfps_6;
149#define TIMER_LFPS_80US 0 157#define TIMER_LFPS_80US 0
150} __packed;
151 158
152struct usb338x_ll_tsn_regs { 159 /* 0x750 */
153 /* offset 0x77C */ 160 u32 unused6[8];
161
162 /* 0x770 */
163 u32 unused7[3];
154 u32 ll_tsn_counters_2; 164 u32 ll_tsn_counters_2;
155#define HOT_TX_NORESET_TS2 24 165#define HOT_TX_NORESET_TS2 24
166
167 /* 0x780 */
156 u32 ll_tsn_counters_3; 168 u32 ll_tsn_counters_3;
157#define HOT_RX_RESET_TS2 0 169#define HOT_RX_RESET_TS2 0
158} __packed; 170 u32 unused8[3];
159 171
160struct usb338x_ll_chi_regs { 172 /* 0x790 */
161 /* offset 0x79C */ 173 u32 unused9;
174 u32 ll_lfps_timers_2;
175#define LFPS_TIMERS_2_WORKAROUND_VALUE 0x084d
176 u32 unused10;
162 u32 ll_tsn_chicken_bit; 177 u32 ll_tsn_chicken_bit;
163#define RECOVERY_IDLE_TO_RECOVER_FMW 3 178#define RECOVERY_IDLE_TO_RECOVER_FMW 3
164} __packed; 179} __packed;