From ac218ced9832b0f166d7e392d310425e6f314445 Mon Sep 17 00:00:00 2001 From: Ke Du Date: Thu, 30 May 2024 17:46:26 +0800 Subject: [PATCH] ARM: dts: msm: Add dependency of iommu node on USB driver Currently, wait_for_device_probe api added before dwc3_probe is called in core_init which is suppose to ensure that in case the child is getting teared down, the userspace doesn't get to write UDC and do gadget_start. However, wait_for_device_probe api makes sure that the driver wait until all probes are completed. Ideally, it wouldn't be a problem but in cases of other driver's probe fails, usb would be affected here even though usb isn't at fault. Fix this by making a dummy-dependency on smmu node since the original intention of the patch was to make sure if smmu driver was probed successfully, then only proceed for child driver's probe. Change-Id: Id05797f8dcd26783e3c0eab4facf4f4672790fe6 Signed-off-by: Udipto Goswami Signed-off-by: Ke Du --- qcom/monaco-usb.dtsi | 6 ++++++ qcom/parrot-usb.dtsi | 6 ++++++ qcom/pineapple-usb.dtsi | 8 +++++++- qcom/sun-usb.dtsi | 6 ++++++ 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/qcom/monaco-usb.dtsi b/qcom/monaco-usb.dtsi index 768028e8..b4f90a77 100644 --- a/qcom/monaco-usb.dtsi +++ b/qcom/monaco-usb.dtsi @@ -55,6 +55,12 @@ 0x144 /* GSI_RING_BASE_ADDR_H */ 0x1a4>; /* GSI_IF_STS */ + /* + * Establish dependency on smmu driver so that depopulate path of + * deferred probe doesn't run into existing bug in smmu driver. + */ + dummy-supply = <&apps_smmu>; + dwc3@4e00000 { compatible = "snps,dwc3"; reg = <0x4e00000 0xcd00>; diff --git a/qcom/parrot-usb.dtsi b/qcom/parrot-usb.dtsi index 3c70d4a7..93856c1f 100644 --- a/qcom/parrot-usb.dtsi +++ b/qcom/parrot-usb.dtsi @@ -53,6 +53,12 @@ <&aggre1_noc MASTER_USB3_0 &cnoc2 SLAVE_IPA_CFG>, <&gem_noc MASTER_APPSS_PROC &cnoc2 SLAVE_USB3_0>; + /* + * Establish dependency on smmu driver so that depopulate path of + * deferred probe doesn't run into existing bug in smmu driver. + */ + dummy-supply = <&apps_smmu>; + dwc3_0: dwc3@a600000 { compatible = "snps,dwc3"; reg = <0x0 0xa600000 0x0 0xd800>; diff --git a/qcom/pineapple-usb.dtsi b/qcom/pineapple-usb.dtsi index db18a668..5ce462a1 100644 --- a/qcom/pineapple-usb.dtsi +++ b/qcom/pineapple-usb.dtsi @@ -1,6 +1,6 @@ // SPDX-License-Identifier: BSD-3-Clause /* - * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved. */ #include @@ -58,6 +58,12 @@ <&aggre1_noc MASTER_USB3_0 &config_noc SLAVE_IPA_CFG>, <&gem_noc MASTER_APPSS_PROC &config_noc SLAVE_USB3_0>; + /* + * Establish dependency on smmu driver so that depopulate path of + * deferred probe doesn't run into existing bug in smmu driver. + */ + dummy-supply = <&apps_smmu>; + dwc3@a600000 { compatible = "snps,dwc3"; reg = <0xa600000 0xd93c>; diff --git a/qcom/sun-usb.dtsi b/qcom/sun-usb.dtsi index 72b71966..2e4c642a 100644 --- a/qcom/sun-usb.dtsi +++ b/qcom/sun-usb.dtsi @@ -59,6 +59,12 @@ 0x144 /* GSI_RING_BASE_ADDR_H */ 0x1a4>; /* GSI_IF_STS */ + /* + * Establish dependency on smmu driver so that depopulate path of + * deferred probe doesn't run into existing bug in smmu driver. + */ + dummy-supply = <&apps_smmu>; + dwc3_0: dwc3@a600000 { compatible = "snps,dwc3"; reg = <0x0 0xa600000 0x0 0xd93c>;