Message ID | 20230126031424.14582-15-quic_wcheng@quicinc.com |
---|---|
State | Superseded |
Headers | show |
Series | Introduce QC USB SND audio offloading support | expand |
Hi Krzysztof, On 1/26/2023 4:01 AM, Krzysztof Kozlowski wrote: > On 26/01/2023 04:14, Wesley Cheng wrote: >> Add a new definition for specifying how many XHCI secondary interrupters >> can be allocated. XHCI in general can potentially support up to 1024 >> interrupters, which some uses may want to limit depending on how many >> users utilize the interrupters. > > I cannot find in the code any user of this. Your next patch stores it, > but which other patch uses stored value? > > What I still don't get how is this exactly hardware property, not policy > or driver choice. > Sorry I must have missed that patchset when rebasing over Mathias' xHCI changes. It was there previously in my initial submission where the property is carried over into xhci-plat from dwc3/host.c. So the xHC controller has a HCSPARAMs field that defines the number of interrupters it can support. It does potentially have the capability of having 1024 interrupters. Each interrupter has to have its own set of interrupt register sets, which depending on the vendor implementing it could limit the maximum. For example, as stated below, DWC3 only allows for 8 interrupters to be allocated. The purpose for this property is to allow the user/driver to not have to allocate memory for supporting 1024 event rings, if they are only going to utilize one. Likewise, if the user attempts to allocate more than what is supported by the HW, then Mathias' SW will cross check to ensure that isn't allowed. (by checking the HCSPARAMs against the DT property below) >> >> Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com> >> --- >> Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 12 ++++++++++++ >> 1 file changed, 12 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml >> index 6d78048c4613..4faaec9655e0 100644 >> --- a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml >> +++ b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml >> @@ -349,6 +349,18 @@ properties: >> items: >> enum: [1, 4, 8, 16, 32, 64, 128, 256] >> >> + snps,num-hc-interrupters: >> + description: >> + Defines the maximum number of XHCI host controller interrupters that can >> + be supported. The XHCI host controller has support to allocate multiple >> + event rings, which can be assigned to different clients/users. The DWC3 >> + controller has a maximum of 8 interrupters. If this is not defined then >> + the value will be defaulted to 1. This parameter is used only when >> + operating in host mode. >> + $ref: /schemas/types.yaml#/definitions/uint8 >> + minimum: 1 >> + maximum: 8 > > default: 1 > Got it. Thanks Wesley Cheng
diff --git a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml index 6d78048c4613..4faaec9655e0 100644 --- a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml +++ b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml @@ -349,6 +349,18 @@ properties: items: enum: [1, 4, 8, 16, 32, 64, 128, 256] + snps,num-hc-interrupters: + description: + Defines the maximum number of XHCI host controller interrupters that can + be supported. The XHCI host controller has support to allocate multiple + event rings, which can be assigned to different clients/users. The DWC3 + controller has a maximum of 8 interrupters. If this is not defined then + the value will be defaulted to 1. This parameter is used only when + operating in host mode. + $ref: /schemas/types.yaml#/definitions/uint8 + minimum: 1 + maximum: 8 + port: $ref: /schemas/graph.yaml#/properties/port description:
Add a new definition for specifying how many XHCI secondary interrupters can be allocated. XHCI in general can potentially support up to 1024 interrupters, which some uses may want to limit depending on how many users utilize the interrupters. Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com> --- Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+)