From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Bjorn Andersson <quic_bjorande@quicinc.com>
Cc: Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Wesley Cheng <quic_wcheng@quicinc.com>,
Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
Felipe Balbi <balbi@kernel.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Johan Hovold <johan@kernel.org>,
Krishna Kurapati PSSNV <quic_kriskura@quicinc.com>
Subject: Re: [PATCH 00/12] usb: dwc3: qcom: Flatten dwc3 structure
Date: Fri, 20 Oct 2023 22:04:48 +0000 [thread overview]
Message-ID: <20231020220432.sutkinakkd6ncuej@synopsys.com> (raw)
In-Reply-To: <20231016-dwc3-refactor-v1-0-ab4a84165470@quicinc.com>
Hi Bjorn,
On Mon, Oct 16, 2023, Bjorn Andersson wrote:
> The USB IP-block found in most Qualcomm platforms is modelled in the
> Linux kernel as 3 different independent device drivers, but as shown by
> the already existing layering violations in the Qualcomm glue driver
> they can not be operated independently.
>
> With the current implementation, the glue driver registers the core and
> has no way to know when this is done. As a result, e.g. the suspend
> callbacks needs to guard against NULL pointer dereferences when trying
> to peek into the struct dwc3 found in the drvdata of the child.
>
> Missing from the upstream Qualcomm USB support is handling of role
> switching, in which the glue needs to be notified upon DRD mode changes.
> Several attempts has been made through the years to register callbacks
> etc, but they always fall short when it comes to handling of the core's
> probe deferral on resources etc.
>
> Furhtermore, the DeviceTree binding is a direct representation of the
> Linux driver model, and doesn't necessarily describe "the USB IP-block".
>
> This series therefor attempts to flatten the driver split, and operate
> the glue and core out of the same platform_device instance. And in order
> to do this, the DeviceTree representation of the IP block is flattened.
>
> As a side effect, much of the ACPI integration code is dropped.
>
> Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
> ---
> Bjorn Andersson (12):
> dt-bindings: usb: qcom,dwc3: Add qcom,sc8180x-dwc3
> usb: dwc3: qcom: Rename dwc3 platform_device reference
> usb: dwc3: qcom: Merge resources from urs_usb device
> usb: dwc3: Expose core driver as library
> usb: dwc3: Override end of dwc3 memory resource
> usb: dwc3: qcom: Add dwc3 core reference in driver state
> usb: dwc3: qcom: Instantiate dwc3 core directly
> usb: dwc3: qcom: Inline the qscratch constants
> dt-bindings: usb: qcom,dwc3: Rename to "glue"
> dt-bindings: usb: qcom,dwc3: Introduce flattened qcom,dwc3 binding
> usb: dwc3: qcom: Flatten the Qualcomm dwc3 binding and implementation
> arm64: dts: qcom: sc8180x: flatten usb_sec node
>
> .../devicetree/bindings/usb/qcom,dwc3-glue.yaml | 626 +++++++++++++++++++++
> .../devicetree/bindings/usb/qcom,dwc3.yaml | 321 ++++-------
> .../devicetree/bindings/usb/snps,dwc3.yaml | 14 +-
> .../arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts | 6 +-
> arch/arm64/boot/dts/qcom/sc8180x-primus.dts | 6 +-
> arch/arm64/boot/dts/qcom/sc8180x.dtsi | 34 +-
> drivers/usb/dwc3/core.c | 136 +++--
> drivers/usb/dwc3/core.h | 10 +
> drivers/usb/dwc3/dwc3-qcom.c | 328 ++++++-----
> 9 files changed, 1057 insertions(+), 424 deletions(-)
> ---
> base-commit: 4d0515b235dec789578d135a5db586b25c5870cb
> change-id: 20231016-dwc3-refactor-931e3b08a8b9
>
> Best regards,
> --
> Bjorn Andersson <quic_bjorande@quicinc.com>
>
First of all, thanks for the work.
I just did a quick review through the changes, and I think it's great!
(This will address some issues I also have with dwc3 currently too.)
BR,
Thinh
next prev parent reply other threads:[~2023-10-20 22:05 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-17 3:11 [PATCH 00/12] usb: dwc3: qcom: Flatten dwc3 structure Bjorn Andersson
2023-10-17 3:11 ` [PATCH 01/12] dt-bindings: usb: qcom,dwc3: Add qcom,sc8180x-dwc3 Bjorn Andersson
2023-10-17 6:03 ` Krzysztof Kozlowski
2023-10-17 3:11 ` [PATCH 02/12] usb: dwc3: qcom: Rename dwc3 platform_device reference Bjorn Andersson
2023-10-17 16:08 ` Konrad Dybcio
2023-11-22 9:58 ` Johan Hovold
2023-10-17 3:11 ` [PATCH 03/12] usb: dwc3: qcom: Merge resources from urs_usb device Bjorn Andersson
2023-10-20 6:02 ` kernel test robot
2023-11-22 10:24 ` Johan Hovold
2024-01-08 16:25 ` Bjorn Andersson
2023-10-17 3:11 ` [PATCH 04/12] usb: dwc3: Expose core driver as library Bjorn Andersson
2023-10-20 22:18 ` Thinh Nguyen
2023-11-22 11:57 ` Johan Hovold
2024-01-08 16:42 ` Bjorn Andersson
2023-10-17 3:11 ` [PATCH 05/12] usb: dwc3: Override end of dwc3 memory resource Bjorn Andersson
2023-10-17 16:14 ` Konrad Dybcio
2023-10-20 22:07 ` Thinh Nguyen
2023-10-17 3:11 ` [PATCH 06/12] usb: dwc3: qcom: Add dwc3 core reference in driver state Bjorn Andersson
2023-11-22 12:18 ` Johan Hovold
2024-01-08 18:02 ` Bjorn Andersson
2023-10-17 3:11 ` [PATCH 07/12] usb: dwc3: qcom: Instantiate dwc3 core directly Bjorn Andersson
2023-11-22 12:23 ` Johan Hovold
2024-01-10 3:16 ` Krishna Kurapati PSSNV
2023-10-17 3:11 ` [PATCH 08/12] usb: dwc3: qcom: Inline the qscratch constants Bjorn Andersson
2023-10-17 16:18 ` Konrad Dybcio
2023-10-17 3:11 ` [PATCH 09/12] dt-bindings: usb: qcom,dwc3: Rename to "glue" Bjorn Andersson
2023-10-17 6:05 ` Krzysztof Kozlowski
2023-11-22 12:25 ` Johan Hovold
2023-10-17 3:11 ` [PATCH 10/12] dt-bindings: usb: qcom,dwc3: Introduce flattened qcom,dwc3 binding Bjorn Andersson
2023-10-17 6:11 ` Krzysztof Kozlowski
2023-10-17 22:54 ` Bjorn Andersson
2023-10-18 6:00 ` Krzysztof Kozlowski
2023-10-17 18:31 ` Rob Herring
2023-10-17 21:02 ` Bjorn Andersson
2023-11-22 12:40 ` Johan Hovold
2023-10-17 3:11 ` [PATCH 11/12] usb: dwc3: qcom: Flatten the Qualcomm dwc3 binding and implementation Bjorn Andersson
2024-01-10 3:13 ` Krishna Kurapati PSSNV
2024-01-10 19:23 ` Bjorn Andersson
2023-10-17 3:11 ` [PATCH 12/12] arm64: dts: qcom: sc8180x: flatten usb_sec node Bjorn Andersson
2023-10-20 22:04 ` Thinh Nguyen [this message]
2023-11-22 9:48 ` [PATCH 00/12] usb: dwc3: qcom: Flatten dwc3 structure Johan Hovold
2024-01-08 16:46 ` Bjorn Andersson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231020220432.sutkinakkd6ncuej@synopsys.com \
--to=thinh.nguyen@synopsys.com \
--cc=andersson@kernel.org \
--cc=balbi@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=johan@kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=quic_bjorande@quicinc.com \
--cc=quic_kriskura@quicinc.com \
--cc=quic_wcheng@quicinc.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).