Hi Dmitry,
On 12/24/2022 3:13 AM, Dmitry Baryshkov wrote:
On Sat, 24 Dec 2022 at 01:33, Wesley Cheng <quic_wcheng@xxxxxxxxxxx> wrote:
Allow for the DWC3 host driver to pass along a XHCI property that defines
how many interrupters to allocate. This is in relation for the number of
event rings that can be potentially used by other processors within the
system.
Signed-off-by: Wesley Cheng <quic_wcheng@xxxxxxxxxxx>
---
drivers/usb/dwc3/core.c | 12 ++++++++++++
drivers/usb/dwc3/core.h | 2 ++
drivers/usb/dwc3/host.c | 5 ++++-
3 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 476b63618511..67d6f0ae81d2 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -1446,6 +1446,7 @@ static void dwc3_get_properties(struct dwc3 *dwc)
u8 tx_thr_num_pkt_prd = 0;
u8 tx_max_burst_prd = 0;
u8 tx_fifo_resize_max_num;
+ u8 num_hc_interrupters;
const char *usb_psy_name;
int ret;
@@ -1468,6 +1469,9 @@ static void dwc3_get_properties(struct dwc3 *dwc)
*/
tx_fifo_resize_max_num = 6;
+ /* default to a single XHCI interrupter */
+ num_hc_interrupters = 1;
+
dwc->maximum_speed = usb_get_maximum_speed(dev);
dwc->max_ssp_rate = usb_get_maximum_ssp_rate(dev);
dwc->dr_mode = usb_get_dr_mode(dev);
@@ -1511,6 +1515,12 @@ static void dwc3_get_properties(struct dwc3 *dwc)
&tx_thr_num_pkt_prd);
device_property_read_u8(dev, "snps,tx-max-burst-prd",
&tx_max_burst_prd);
+ device_property_read_u8(dev, "snps,num-hc-interrupters",
+ &num_hc_interrupters);
bindings change?
Will add one. Thanks!
Thanks
Wesley Cheng