From: Greg Kroah-Hartman Date: Tue, 18 Oct 2022 16:46:31 +0000 (+0200) Subject: drop phy-qcom-qmp-usb-drop-pipe-clock-lane-suffix.patch X-Git-Tag: v6.0.3~59 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fd213123c84c19ecd7455b3c1c81a3bb1b03d00a;p=thirdparty%2Fkernel%2Fstable-queue.git drop phy-qcom-qmp-usb-drop-pipe-clock-lane-suffix.patch --- diff --git a/queue-5.10/phy-qcom-qmp-usb-drop-pipe-clock-lane-suffix.patch b/queue-5.10/phy-qcom-qmp-usb-drop-pipe-clock-lane-suffix.patch deleted file mode 100644 index f70e3b16386..00000000000 --- a/queue-5.10/phy-qcom-qmp-usb-drop-pipe-clock-lane-suffix.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 5bfef756238ed6300056dbf5152f2a2be054b52e Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 30 Aug 2022 13:29:23 +0200 -Subject: phy: qcom-qmp-usb: drop pipe clock lane suffix - -From: Johan Hovold - -[ Upstream commit c8c5d5e89ac52a462f48264863a7a32f0c76fa1d ] - -The pipe clock is defined in the "lane" node so there's no need to keep -adding a redundant lane-number suffix to the clock name. - -Update driver to support the new binding where the pipe clock name has -been deprecated by instead requesting the clock by index. - -Reviewed-by: Krzysztof Kozlowski -Reviewed-by: Dmitry Baryshkov -Signed-off-by: Johan Hovold -Link: https://lore.kernel.org/r/20220830112923.3725-31-johan+linaro@kernel.org -Signed-off-by: Vinod Koul -Stable-dep-of: a5d6b1ac56cb ("phy: qcom-qmp-usb: fix memleak on probe deferral") -Signed-off-by: Sasha Levin ---- - drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c -index 687f1a534837..116f60ef0649 100644 ---- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c -+++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c -@@ -2510,7 +2510,6 @@ int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id, - struct qcom_qmp *qmp = dev_get_drvdata(dev); - struct phy *generic_phy; - struct qmp_phy *qphy; -- char prop_name[MAX_PROP_NAME]; - int ret; - - qphy = devm_kzalloc(dev, sizeof(*qphy), GFP_KERNEL); -@@ -2566,8 +2565,7 @@ int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id, - if (!qphy->pcs_misc) - dev_vdbg(dev, "PHY pcs_misc-reg not used\n"); - -- snprintf(prop_name, sizeof(prop_name), "pipe%d", id); -- qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name); -+ qphy->pipe_clk = devm_get_clk_from_child(dev, np, NULL); - if (IS_ERR(qphy->pipe_clk)) { - return dev_err_probe(dev, PTR_ERR(qphy->pipe_clk), - "failed to get lane%d pipe clock\n", id); --- -2.35.1 - diff --git a/queue-5.10/phy-qcom-qmp-usb-fix-memleak-on-probe-deferral.patch b/queue-5.10/phy-qcom-qmp-usb-fix-memleak-on-probe-deferral.patch index e124d0d6918..01f7f13011b 100644 --- a/queue-5.10/phy-qcom-qmp-usb-fix-memleak-on-probe-deferral.patch +++ b/queue-5.10/phy-qcom-qmp-usb-fix-memleak-on-probe-deferral.patch @@ -1,4 +1,4 @@ -From e0632f4b76cb0969d02f3a521cc9e879d9c6d412 Mon Sep 17 00:00:00 2001 +From e1c35c2f2b63651158f5c4744cf3b5cc3a1a2843 Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Fri, 16 Sep 2022 12:23:35 +0200 Subject: phy: qcom-qmp-usb: fix memleak on probe deferral @@ -22,14 +22,12 @@ Link: https://lore.kernel.org/r/20220916102340.11520-7-johan+linaro@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- - drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 57 ++++++++++++++++++------- - 1 file changed, 42 insertions(+), 15 deletions(-) + drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 61 +++++++++++++++++++++++--------- + 1 file changed, 44 insertions(+), 17 deletions(-) -diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c -index 116f60ef0649..b727dcf4f906 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c -@@ -2503,6 +2503,21 @@ static const struct phy_ops qcom_qmp_phy_usb_ops = { +@@ -2503,6 +2503,21 @@ static const struct phy_ops qcom_qmp_phy .owner = THIS_MODULE, }; @@ -51,10 +49,10 @@ index 116f60ef0649..b727dcf4f906 100644 static int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id, void __iomem *serdes, const struct qmp_phy_cfg *cfg) -@@ -2510,8 +2525,18 @@ int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id, - struct qcom_qmp *qmp = dev_get_drvdata(dev); +@@ -2511,8 +2526,18 @@ int qcom_qmp_phy_usb_create(struct devic struct phy *generic_phy; struct qmp_phy *qphy; + char prop_name[MAX_PROP_NAME]; + bool exclusive = true; int ret; @@ -70,34 +68,36 @@ index 116f60ef0649..b727dcf4f906 100644 qphy = devm_kzalloc(dev, sizeof(*qphy), GFP_KERNEL); if (!qphy) return -ENOMEM; -@@ -2524,17 +2549,17 @@ int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id, +@@ -2525,17 +2550,17 @@ int qcom_qmp_phy_usb_create(struct devic * For dual lane PHYs: tx2 -> 3, rx2 -> 4, pcs_misc (optional) -> 5 * For single lane PHYs: pcs_misc (optional) -> 3. */ - qphy->tx = of_iomap(np, 0); - if (!qphy->tx) - return -ENOMEM; -+ qphy->tx = devm_of_iomap(dev, np, 0, NULL); -+ if (IS_ERR(qphy->tx)) -+ return PTR_ERR(qphy->tx); - +- - qphy->rx = of_iomap(np, 1); - if (!qphy->rx) - return -ENOMEM; -+ qphy->rx = devm_of_iomap(dev, np, 1, NULL); -+ if (IS_ERR(qphy->rx)) -+ return PTR_ERR(qphy->rx); - +- - qphy->pcs = of_iomap(np, 2); - if (!qphy->pcs) - return -ENOMEM; ++ qphy->tx = devm_of_iomap(dev, np, 0, NULL); ++ if (IS_ERR(qphy->tx)) ++ return PTR_ERR(qphy->tx); ++ ++ qphy->rx = devm_of_iomap(dev, np, 1, NULL); ++ if (IS_ERR(qphy->rx)) ++ return PTR_ERR(qphy->rx); ++ + qphy->pcs = qmp_usb_iomap(dev, np, 2, exclusive); + if (IS_ERR(qphy->pcs)) + return PTR_ERR(qphy->pcs); /* * If this is a dual-lane PHY, then there should be registers for the -@@ -2543,9 +2568,9 @@ int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id, +@@ -2544,9 +2569,9 @@ int qcom_qmp_phy_usb_create(struct devic * offset from the first lane. */ if (cfg->is_dual_lane_phy) { @@ -110,7 +110,7 @@ index 116f60ef0649..b727dcf4f906 100644 dev_warn(dev, "Underspecified device tree, falling back to legacy register regions\n"); -@@ -2555,15 +2580,17 @@ int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id, +@@ -2556,15 +2581,17 @@ int qcom_qmp_phy_usb_create(struct devic qphy->rx2 = qphy->rx + QMP_PHY_LEGACY_LANE_STRIDE; } else { @@ -129,8 +129,5 @@ index 116f60ef0649..b727dcf4f906 100644 + qphy->pcs_misc = NULL; + } - qphy->pipe_clk = devm_get_clk_from_child(dev, np, NULL); - if (IS_ERR(qphy->pipe_clk)) { --- -2.35.1 - + snprintf(prop_name, sizeof(prop_name), "pipe%d", id); + qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name); diff --git a/queue-5.10/series b/queue-5.10/series index f0700edd873..584e557023b 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -250,7 +250,6 @@ phy-qcom-qmp-usb-change-symbol-prefix-to-qcom_qmp_ph.patch phy-qcom-qmp-usb-drop-support-for-non-usb-phy-types.patch phy-qcom-qmp-usb-cleanup-the-driver.patch phy-qcom-qmp-usb-clean-up-pipe-clock-handling.patch -phy-qcom-qmp-usb-drop-pipe-clock-lane-suffix.patch phy-qcom-qmp-usb-fix-memleak-on-probe-deferral.patch mtd-rawnand-fsl_elbc-fix-none-ecc-mode.patch rdma-siw-always-consume-all-skbuf-data-in-sk_data_re.patch diff --git a/queue-5.15/phy-qcom-qmp-usb-drop-pipe-clock-lane-suffix.patch b/queue-5.15/phy-qcom-qmp-usb-drop-pipe-clock-lane-suffix.patch deleted file mode 100644 index fe6844728f3..00000000000 --- a/queue-5.15/phy-qcom-qmp-usb-drop-pipe-clock-lane-suffix.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 3805907d92cd0199edf405eb7a3d16e023f481fb Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 30 Aug 2022 13:29:23 +0200 -Subject: phy: qcom-qmp-usb: drop pipe clock lane suffix - -From: Johan Hovold - -[ Upstream commit c8c5d5e89ac52a462f48264863a7a32f0c76fa1d ] - -The pipe clock is defined in the "lane" node so there's no need to keep -adding a redundant lane-number suffix to the clock name. - -Update driver to support the new binding where the pipe clock name has -been deprecated by instead requesting the clock by index. - -Reviewed-by: Krzysztof Kozlowski -Reviewed-by: Dmitry Baryshkov -Signed-off-by: Johan Hovold -Link: https://lore.kernel.org/r/20220830112923.3725-31-johan+linaro@kernel.org -Signed-off-by: Vinod Koul -Stable-dep-of: a5d6b1ac56cb ("phy: qcom-qmp-usb: fix memleak on probe deferral") -Signed-off-by: Sasha Levin ---- - drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c -index 687f1a534837..116f60ef0649 100644 ---- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c -+++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c -@@ -2510,7 +2510,6 @@ int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id, - struct qcom_qmp *qmp = dev_get_drvdata(dev); - struct phy *generic_phy; - struct qmp_phy *qphy; -- char prop_name[MAX_PROP_NAME]; - int ret; - - qphy = devm_kzalloc(dev, sizeof(*qphy), GFP_KERNEL); -@@ -2566,8 +2565,7 @@ int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id, - if (!qphy->pcs_misc) - dev_vdbg(dev, "PHY pcs_misc-reg not used\n"); - -- snprintf(prop_name, sizeof(prop_name), "pipe%d", id); -- qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name); -+ qphy->pipe_clk = devm_get_clk_from_child(dev, np, NULL); - if (IS_ERR(qphy->pipe_clk)) { - return dev_err_probe(dev, PTR_ERR(qphy->pipe_clk), - "failed to get lane%d pipe clock\n", id); --- -2.35.1 - diff --git a/queue-5.15/phy-qcom-qmp-usb-fix-memleak-on-probe-deferral.patch b/queue-5.15/phy-qcom-qmp-usb-fix-memleak-on-probe-deferral.patch index 10a2d1f5f85..01f7f13011b 100644 --- a/queue-5.15/phy-qcom-qmp-usb-fix-memleak-on-probe-deferral.patch +++ b/queue-5.15/phy-qcom-qmp-usb-fix-memleak-on-probe-deferral.patch @@ -1,4 +1,4 @@ -From e28891255ecb303288fc26a5982f9a3601ef1e35 Mon Sep 17 00:00:00 2001 +From e1c35c2f2b63651158f5c4744cf3b5cc3a1a2843 Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Fri, 16 Sep 2022 12:23:35 +0200 Subject: phy: qcom-qmp-usb: fix memleak on probe deferral @@ -22,14 +22,12 @@ Link: https://lore.kernel.org/r/20220916102340.11520-7-johan+linaro@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- - drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 57 ++++++++++++++++++------- - 1 file changed, 42 insertions(+), 15 deletions(-) + drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 61 +++++++++++++++++++++++--------- + 1 file changed, 44 insertions(+), 17 deletions(-) -diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c -index 116f60ef0649..b727dcf4f906 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c -@@ -2503,6 +2503,21 @@ static const struct phy_ops qcom_qmp_phy_usb_ops = { +@@ -2503,6 +2503,21 @@ static const struct phy_ops qcom_qmp_phy .owner = THIS_MODULE, }; @@ -51,10 +49,10 @@ index 116f60ef0649..b727dcf4f906 100644 static int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id, void __iomem *serdes, const struct qmp_phy_cfg *cfg) -@@ -2510,8 +2525,18 @@ int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id, - struct qcom_qmp *qmp = dev_get_drvdata(dev); +@@ -2511,8 +2526,18 @@ int qcom_qmp_phy_usb_create(struct devic struct phy *generic_phy; struct qmp_phy *qphy; + char prop_name[MAX_PROP_NAME]; + bool exclusive = true; int ret; @@ -70,34 +68,36 @@ index 116f60ef0649..b727dcf4f906 100644 qphy = devm_kzalloc(dev, sizeof(*qphy), GFP_KERNEL); if (!qphy) return -ENOMEM; -@@ -2524,17 +2549,17 @@ int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id, +@@ -2525,17 +2550,17 @@ int qcom_qmp_phy_usb_create(struct devic * For dual lane PHYs: tx2 -> 3, rx2 -> 4, pcs_misc (optional) -> 5 * For single lane PHYs: pcs_misc (optional) -> 3. */ - qphy->tx = of_iomap(np, 0); - if (!qphy->tx) - return -ENOMEM; -+ qphy->tx = devm_of_iomap(dev, np, 0, NULL); -+ if (IS_ERR(qphy->tx)) -+ return PTR_ERR(qphy->tx); - +- - qphy->rx = of_iomap(np, 1); - if (!qphy->rx) - return -ENOMEM; -+ qphy->rx = devm_of_iomap(dev, np, 1, NULL); -+ if (IS_ERR(qphy->rx)) -+ return PTR_ERR(qphy->rx); - +- - qphy->pcs = of_iomap(np, 2); - if (!qphy->pcs) - return -ENOMEM; ++ qphy->tx = devm_of_iomap(dev, np, 0, NULL); ++ if (IS_ERR(qphy->tx)) ++ return PTR_ERR(qphy->tx); ++ ++ qphy->rx = devm_of_iomap(dev, np, 1, NULL); ++ if (IS_ERR(qphy->rx)) ++ return PTR_ERR(qphy->rx); ++ + qphy->pcs = qmp_usb_iomap(dev, np, 2, exclusive); + if (IS_ERR(qphy->pcs)) + return PTR_ERR(qphy->pcs); /* * If this is a dual-lane PHY, then there should be registers for the -@@ -2543,9 +2568,9 @@ int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id, +@@ -2544,9 +2569,9 @@ int qcom_qmp_phy_usb_create(struct devic * offset from the first lane. */ if (cfg->is_dual_lane_phy) { @@ -110,7 +110,7 @@ index 116f60ef0649..b727dcf4f906 100644 dev_warn(dev, "Underspecified device tree, falling back to legacy register regions\n"); -@@ -2555,15 +2580,17 @@ int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id, +@@ -2556,15 +2581,17 @@ int qcom_qmp_phy_usb_create(struct devic qphy->rx2 = qphy->rx + QMP_PHY_LEGACY_LANE_STRIDE; } else { @@ -129,8 +129,5 @@ index 116f60ef0649..b727dcf4f906 100644 + qphy->pcs_misc = NULL; + } - qphy->pipe_clk = devm_get_clk_from_child(dev, np, NULL); - if (IS_ERR(qphy->pipe_clk)) { --- -2.35.1 - + snprintf(prop_name, sizeof(prop_name), "pipe%d", id); + qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name); diff --git a/queue-5.15/series b/queue-5.15/series index b0906b4b566..2a1869b6d4d 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -341,7 +341,6 @@ phy-qcom-qmp-usb-change-symbol-prefix-to-qcom_qmp_ph.patch phy-qcom-qmp-usb-drop-support-for-non-usb-phy-types.patch phy-qcom-qmp-usb-cleanup-the-driver.patch phy-qcom-qmp-usb-clean-up-pipe-clock-handling.patch -phy-qcom-qmp-usb-drop-pipe-clock-lane-suffix.patch phy-qcom-qmp-usb-fix-memleak-on-probe-deferral.patch phy-amlogic-phy-meson-axg-mipi-pcie-analog-hold-refe.patch phy-phy-mtk-tphy-fix-the-phy-type-setting-issue.patch diff --git a/queue-5.19/phy-qcom-qmp-usb-drop-pipe-clock-lane-suffix.patch b/queue-5.19/phy-qcom-qmp-usb-drop-pipe-clock-lane-suffix.patch deleted file mode 100644 index 27311f02185..00000000000 --- a/queue-5.19/phy-qcom-qmp-usb-drop-pipe-clock-lane-suffix.patch +++ /dev/null @@ -1,51 +0,0 @@ -From daa06deeda3b3a38d6e779601a66e1134db96bd3 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 30 Aug 2022 13:29:23 +0200 -Subject: phy: qcom-qmp-usb: drop pipe clock lane suffix - -From: Johan Hovold - -[ Upstream commit c8c5d5e89ac52a462f48264863a7a32f0c76fa1d ] - -The pipe clock is defined in the "lane" node so there's no need to keep -adding a redundant lane-number suffix to the clock name. - -Update driver to support the new binding where the pipe clock name has -been deprecated by instead requesting the clock by index. - -Reviewed-by: Krzysztof Kozlowski -Reviewed-by: Dmitry Baryshkov -Signed-off-by: Johan Hovold -Link: https://lore.kernel.org/r/20220830112923.3725-31-johan+linaro@kernel.org -Signed-off-by: Vinod Koul -Stable-dep-of: a5d6b1ac56cb ("phy: qcom-qmp-usb: fix memleak on probe deferral") -Signed-off-by: Sasha Levin ---- - drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c -index 687f1a534837..116f60ef0649 100644 ---- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c -+++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c -@@ -2510,7 +2510,6 @@ int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id, - struct qcom_qmp *qmp = dev_get_drvdata(dev); - struct phy *generic_phy; - struct qmp_phy *qphy; -- char prop_name[MAX_PROP_NAME]; - int ret; - - qphy = devm_kzalloc(dev, sizeof(*qphy), GFP_KERNEL); -@@ -2566,8 +2565,7 @@ int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id, - if (!qphy->pcs_misc) - dev_vdbg(dev, "PHY pcs_misc-reg not used\n"); - -- snprintf(prop_name, sizeof(prop_name), "pipe%d", id); -- qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name); -+ qphy->pipe_clk = devm_get_clk_from_child(dev, np, NULL); - if (IS_ERR(qphy->pipe_clk)) { - return dev_err_probe(dev, PTR_ERR(qphy->pipe_clk), - "failed to get lane%d pipe clock\n", id); --- -2.35.1 - diff --git a/queue-5.19/phy-qcom-qmp-usb-fix-memleak-on-probe-deferral.patch b/queue-5.19/phy-qcom-qmp-usb-fix-memleak-on-probe-deferral.patch index 3b4b19e7177..01f7f13011b 100644 --- a/queue-5.19/phy-qcom-qmp-usb-fix-memleak-on-probe-deferral.patch +++ b/queue-5.19/phy-qcom-qmp-usb-fix-memleak-on-probe-deferral.patch @@ -1,4 +1,4 @@ -From 8e399daabb84fb7c47e944fa5aa53259a7fb4099 Mon Sep 17 00:00:00 2001 +From e1c35c2f2b63651158f5c4744cf3b5cc3a1a2843 Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Fri, 16 Sep 2022 12:23:35 +0200 Subject: phy: qcom-qmp-usb: fix memleak on probe deferral @@ -22,14 +22,12 @@ Link: https://lore.kernel.org/r/20220916102340.11520-7-johan+linaro@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- - drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 57 ++++++++++++++++++------- - 1 file changed, 42 insertions(+), 15 deletions(-) + drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 61 +++++++++++++++++++++++--------- + 1 file changed, 44 insertions(+), 17 deletions(-) -diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c -index 116f60ef0649..b727dcf4f906 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c -@@ -2503,6 +2503,21 @@ static const struct phy_ops qcom_qmp_phy_usb_ops = { +@@ -2503,6 +2503,21 @@ static const struct phy_ops qcom_qmp_phy .owner = THIS_MODULE, }; @@ -51,10 +49,10 @@ index 116f60ef0649..b727dcf4f906 100644 static int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id, void __iomem *serdes, const struct qmp_phy_cfg *cfg) -@@ -2510,8 +2525,18 @@ int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id, - struct qcom_qmp *qmp = dev_get_drvdata(dev); +@@ -2511,8 +2526,18 @@ int qcom_qmp_phy_usb_create(struct devic struct phy *generic_phy; struct qmp_phy *qphy; + char prop_name[MAX_PROP_NAME]; + bool exclusive = true; int ret; @@ -70,34 +68,36 @@ index 116f60ef0649..b727dcf4f906 100644 qphy = devm_kzalloc(dev, sizeof(*qphy), GFP_KERNEL); if (!qphy) return -ENOMEM; -@@ -2524,17 +2549,17 @@ int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id, +@@ -2525,17 +2550,17 @@ int qcom_qmp_phy_usb_create(struct devic * For dual lane PHYs: tx2 -> 3, rx2 -> 4, pcs_misc (optional) -> 5 * For single lane PHYs: pcs_misc (optional) -> 3. */ - qphy->tx = of_iomap(np, 0); - if (!qphy->tx) - return -ENOMEM; -+ qphy->tx = devm_of_iomap(dev, np, 0, NULL); -+ if (IS_ERR(qphy->tx)) -+ return PTR_ERR(qphy->tx); - +- - qphy->rx = of_iomap(np, 1); - if (!qphy->rx) - return -ENOMEM; -+ qphy->rx = devm_of_iomap(dev, np, 1, NULL); -+ if (IS_ERR(qphy->rx)) -+ return PTR_ERR(qphy->rx); - +- - qphy->pcs = of_iomap(np, 2); - if (!qphy->pcs) - return -ENOMEM; ++ qphy->tx = devm_of_iomap(dev, np, 0, NULL); ++ if (IS_ERR(qphy->tx)) ++ return PTR_ERR(qphy->tx); ++ ++ qphy->rx = devm_of_iomap(dev, np, 1, NULL); ++ if (IS_ERR(qphy->rx)) ++ return PTR_ERR(qphy->rx); ++ + qphy->pcs = qmp_usb_iomap(dev, np, 2, exclusive); + if (IS_ERR(qphy->pcs)) + return PTR_ERR(qphy->pcs); /* * If this is a dual-lane PHY, then there should be registers for the -@@ -2543,9 +2568,9 @@ int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id, +@@ -2544,9 +2569,9 @@ int qcom_qmp_phy_usb_create(struct devic * offset from the first lane. */ if (cfg->is_dual_lane_phy) { @@ -110,7 +110,7 @@ index 116f60ef0649..b727dcf4f906 100644 dev_warn(dev, "Underspecified device tree, falling back to legacy register regions\n"); -@@ -2555,15 +2580,17 @@ int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id, +@@ -2556,15 +2581,17 @@ int qcom_qmp_phy_usb_create(struct devic qphy->rx2 = qphy->rx + QMP_PHY_LEGACY_LANE_STRIDE; } else { @@ -129,8 +129,5 @@ index 116f60ef0649..b727dcf4f906 100644 + qphy->pcs_misc = NULL; + } - qphy->pipe_clk = devm_get_clk_from_child(dev, np, NULL); - if (IS_ERR(qphy->pipe_clk)) { --- -2.35.1 - + snprintf(prop_name, sizeof(prop_name), "pipe%d", id); + qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name); diff --git a/queue-5.19/series b/queue-5.19/series index 8cc0d01ebd0..d9832d9d5e2 100644 --- a/queue-5.19/series +++ b/queue-5.19/series @@ -468,7 +468,6 @@ phy-qcom-qmp-usb-change-symbol-prefix-to-qcom_qmp_ph.patch phy-qcom-qmp-usb-drop-support-for-non-usb-phy-types.patch phy-qcom-qmp-usb-cleanup-the-driver.patch phy-qcom-qmp-usb-clean-up-pipe-clock-handling.patch -phy-qcom-qmp-usb-drop-pipe-clock-lane-suffix.patch phy-qcom-qmp-usb-fix-memleak-on-probe-deferral.patch phy-amlogic-phy-meson-axg-mipi-pcie-analog-hold-refe.patch phy-phy-mtk-tphy-fix-the-phy-type-setting-issue.patch diff --git a/queue-6.0/phy-qcom-qmp-usb-drop-pipe-clock-lane-suffix.patch b/queue-6.0/phy-qcom-qmp-usb-drop-pipe-clock-lane-suffix.patch deleted file mode 100644 index 3e6bd829126..00000000000 --- a/queue-6.0/phy-qcom-qmp-usb-drop-pipe-clock-lane-suffix.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 73c530a52343ed1ac0209422c6b049e611f78561 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 30 Aug 2022 13:29:23 +0200 -Subject: phy: qcom-qmp-usb: drop pipe clock lane suffix - -From: Johan Hovold - -[ Upstream commit c8c5d5e89ac52a462f48264863a7a32f0c76fa1d ] - -The pipe clock is defined in the "lane" node so there's no need to keep -adding a redundant lane-number suffix to the clock name. - -Update driver to support the new binding where the pipe clock name has -been deprecated by instead requesting the clock by index. - -Reviewed-by: Krzysztof Kozlowski -Reviewed-by: Dmitry Baryshkov -Signed-off-by: Johan Hovold -Link: https://lore.kernel.org/r/20220830112923.3725-31-johan+linaro@kernel.org -Signed-off-by: Vinod Koul -Stable-dep-of: a5d6b1ac56cb ("phy: qcom-qmp-usb: fix memleak on probe deferral") -Signed-off-by: Sasha Levin ---- - drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c -index 1eb4ec576361..9f2b6f33c2db 100644 ---- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c -+++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c -@@ -2496,7 +2496,6 @@ int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id, - struct qcom_qmp *qmp = dev_get_drvdata(dev); - struct phy *generic_phy; - struct qmp_phy *qphy; -- char prop_name[MAX_PROP_NAME]; - int ret; - - qphy = devm_kzalloc(dev, sizeof(*qphy), GFP_KERNEL); -@@ -2555,8 +2554,7 @@ int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id, - if (!qphy->pcs_misc) - dev_vdbg(dev, "PHY pcs_misc-reg not used\n"); - -- snprintf(prop_name, sizeof(prop_name), "pipe%d", id); -- qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name); -+ qphy->pipe_clk = devm_get_clk_from_child(dev, np, NULL); - if (IS_ERR(qphy->pipe_clk)) { - return dev_err_probe(dev, PTR_ERR(qphy->pipe_clk), - "failed to get lane%d pipe clock\n", id); --- -2.35.1 - diff --git a/queue-6.0/phy-qcom-qmp-usb-fix-memleak-on-probe-deferral.patch b/queue-6.0/phy-qcom-qmp-usb-fix-memleak-on-probe-deferral.patch index b1a59580386..c98e128aaeb 100644 --- a/queue-6.0/phy-qcom-qmp-usb-fix-memleak-on-probe-deferral.patch +++ b/queue-6.0/phy-qcom-qmp-usb-fix-memleak-on-probe-deferral.patch @@ -22,14 +22,12 @@ Link: https://lore.kernel.org/r/20220916102340.11520-7-johan+linaro@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- - drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 57 ++++++++++++++++++------- - 1 file changed, 42 insertions(+), 15 deletions(-) + drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 61 +++++++++++++++++++++++--------- + 1 file changed, 44 insertions(+), 17 deletions(-) -diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c -index 9f2b6f33c2db..d14481a501d6 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c -@@ -2489,6 +2489,21 @@ static const struct phy_ops qcom_qmp_phy_usb_ops = { +@@ -2489,6 +2489,21 @@ static const struct phy_ops qcom_qmp_phy .owner = THIS_MODULE, }; @@ -51,10 +49,10 @@ index 9f2b6f33c2db..d14481a501d6 100644 static int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id, void __iomem *serdes, const struct qmp_phy_cfg *cfg) -@@ -2496,8 +2511,18 @@ int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id, - struct qcom_qmp *qmp = dev_get_drvdata(dev); +@@ -2497,8 +2512,18 @@ int qcom_qmp_phy_usb_create(struct devic struct phy *generic_phy; struct qmp_phy *qphy; + char prop_name[MAX_PROP_NAME]; + bool exclusive = true; int ret; @@ -70,34 +68,36 @@ index 9f2b6f33c2db..d14481a501d6 100644 qphy = devm_kzalloc(dev, sizeof(*qphy), GFP_KERNEL); if (!qphy) return -ENOMEM; -@@ -2510,17 +2535,17 @@ int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id, +@@ -2511,17 +2536,17 @@ int qcom_qmp_phy_usb_create(struct devic * For dual lane PHYs: tx2 -> 3, rx2 -> 4, pcs_misc (optional) -> 5 * For single lane PHYs: pcs_misc (optional) -> 3. */ - qphy->tx = of_iomap(np, 0); - if (!qphy->tx) - return -ENOMEM; -+ qphy->tx = devm_of_iomap(dev, np, 0, NULL); -+ if (IS_ERR(qphy->tx)) -+ return PTR_ERR(qphy->tx); - +- - qphy->rx = of_iomap(np, 1); - if (!qphy->rx) - return -ENOMEM; -+ qphy->rx = devm_of_iomap(dev, np, 1, NULL); -+ if (IS_ERR(qphy->rx)) -+ return PTR_ERR(qphy->rx); - +- - qphy->pcs = of_iomap(np, 2); - if (!qphy->pcs) - return -ENOMEM; ++ qphy->tx = devm_of_iomap(dev, np, 0, NULL); ++ if (IS_ERR(qphy->tx)) ++ return PTR_ERR(qphy->tx); ++ ++ qphy->rx = devm_of_iomap(dev, np, 1, NULL); ++ if (IS_ERR(qphy->rx)) ++ return PTR_ERR(qphy->rx); ++ + qphy->pcs = qmp_usb_iomap(dev, np, 2, exclusive); + if (IS_ERR(qphy->pcs)) + return PTR_ERR(qphy->pcs); if (cfg->pcs_usb_offset) qphy->pcs_usb = qphy->pcs + cfg->pcs_usb_offset; -@@ -2532,9 +2557,9 @@ int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id, +@@ -2533,9 +2558,9 @@ int qcom_qmp_phy_usb_create(struct devic * offset from the first lane. */ if (cfg->is_dual_lane_phy) { @@ -110,7 +110,7 @@ index 9f2b6f33c2db..d14481a501d6 100644 dev_warn(dev, "Underspecified device tree, falling back to legacy register regions\n"); -@@ -2544,15 +2569,17 @@ int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id, +@@ -2545,15 +2570,17 @@ int qcom_qmp_phy_usb_create(struct devic qphy->rx2 = qphy->rx + QMP_PHY_LEGACY_LANE_STRIDE; } else { @@ -129,8 +129,5 @@ index 9f2b6f33c2db..d14481a501d6 100644 + qphy->pcs_misc = NULL; + } - qphy->pipe_clk = devm_get_clk_from_child(dev, np, NULL); - if (IS_ERR(qphy->pipe_clk)) { --- -2.35.1 - + snprintf(prop_name, sizeof(prop_name), "pipe%d", id); + qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name); diff --git a/queue-6.0/series b/queue-6.0/series index 486683f1fe5..25a32d8647d 100644 --- a/queue-6.0/series +++ b/queue-6.0/series @@ -534,7 +534,6 @@ phy-qcom-qmp-pcie-fix-memleak-on-probe-deferral.patch phy-qcom-qmp-pcie-msm8996-fix-memleak-on-probe-defer.patch phy-qcom-qmp-combo-fix-memleak-on-probe-deferral.patch phy-qcom-qmp-ufs-fix-memleak-on-probe-deferral.patch -phy-qcom-qmp-usb-drop-pipe-clock-lane-suffix.patch phy-qcom-qmp-usb-fix-memleak-on-probe-deferral.patch phy-amlogic-phy-meson-axg-mipi-pcie-analog-hold-refe.patch phy-phy-mtk-tphy-fix-the-phy-type-setting-issue.patch