]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop broken mmc patch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 May 2025 12:34:38 +0000 (14:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 May 2025 12:34:38 +0000 (14:34 +0200)
queue-6.12/mmc-sdhci-of-dwcmshc-add-pd-workaround-on-rk3576.patch [deleted file]
queue-6.12/series
queue-6.14/mmc-sdhci-of-dwcmshc-add-pd-workaround-on-rk3576.patch [deleted file]
queue-6.14/series

diff --git a/queue-6.12/mmc-sdhci-of-dwcmshc-add-pd-workaround-on-rk3576.patch b/queue-6.12/mmc-sdhci-of-dwcmshc-add-pd-workaround-on-rk3576.patch
deleted file mode 100644 (file)
index 9f01197..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-From 08f959759e1e6e9c4b898c51a7d387ac3480630b Mon Sep 17 00:00:00 2001
-From: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
-Date: Wed, 23 Apr 2025 09:53:32 +0200
-Subject: mmc: sdhci-of-dwcmshc: add PD workaround on RK3576
-
-From: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
-
-commit 08f959759e1e6e9c4b898c51a7d387ac3480630b upstream.
-
-RK3576's power domains have a peculiar design where the PD_NVM power
-domain, of which the sdhci controller is a part, seemingly does not have
-idempotent runtime disable/enable. The end effect is that if PD_NVM gets
-turned off by the generic power domain logic because all the devices
-depending on it are suspended, then the next time the sdhci device is
-unsuspended, it'll hang the SoC as soon as it tries accessing the CQHCI
-registers.
-
-RK3576's UFS support needed a new dev_pm_genpd_rpm_always_on function
-added to the generic power domains API to handle what appears to be a
-similar hardware design.
-
-Use this new function to ask for the same treatment in the sdhci
-controller by giving rk3576 its own platform data with its own postinit
-function. The benefit of doing this instead of marking the power domains
-always on in the power domain core is that we only do this if we know
-the platform we're running on actually uses the sdhci controller. For
-others, keeping PD_NVM always on would be a waste, as they won't run
-into this specific issue. The only other IP in PD_NVM that could be
-affected is FSPI0. If it gets a mainline driver, it will probably want
-to do the same thing.
-
-Acked-by: Adrian Hunter <adrian.hunter@intel.com>
-Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
-Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
-Fixes: cfee1b507758 ("pmdomain: rockchip: Add support for RK3576 SoC")
-Cc: <stable@vger.kernel.org> # v6.15+
-Link: https://lore.kernel.org/r/20250423-rk3576-emmc-fix-v3-1-0bf80e29967f@collabora.com
-Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/mmc/host/sdhci-of-dwcmshc.c |   40 ++++++++++++++++++++++++++++++++++++
- 1 file changed, 40 insertions(+)
-
---- a/drivers/mmc/host/sdhci-of-dwcmshc.c
-+++ b/drivers/mmc/host/sdhci-of-dwcmshc.c
-@@ -17,6 +17,7 @@
- #include <linux/module.h>
- #include <linux/of.h>
- #include <linux/platform_device.h>
-+#include <linux/pm_domain.h>
- #include <linux/pm_runtime.h>
- #include <linux/reset.h>
- #include <linux/sizes.h>
-@@ -787,6 +788,29 @@ static void dwcmshc_rk35xx_postinit(stru
-       }
- }
-+static void dwcmshc_rk3576_postinit(struct sdhci_host *host, struct dwcmshc_priv *dwc_priv)
-+{
-+      struct device *dev = mmc_dev(host->mmc);
-+      int ret;
-+
-+      /*
-+       * This works around the design of the RK3576's power domains, which
-+       * makes the PD_NVM power domain, which the sdhci controller on the
-+       * RK3576 is in, never come back the same way once it's run-time
-+       * suspended once. This can happen during early kernel boot if no driver
-+       * is using either PD_NVM or its child power domain PD_SDGMAC for a
-+       * short moment, leading to it being turned off to save power. By
-+       * keeping it on, sdhci suspending won't lead to PD_NVM becoming a
-+       * candidate for getting turned off.
-+       */
-+      ret = dev_pm_genpd_rpm_always_on(dev, true);
-+      if (ret && ret != -EOPNOTSUPP)
-+              dev_warn(dev, "failed to set PD rpm always on, SoC may hang later: %pe\n",
-+                       ERR_PTR(ret));
-+
-+      dwcmshc_rk35xx_postinit(host, dwc_priv);
-+}
-+
- static int th1520_execute_tuning(struct sdhci_host *host, u32 opcode)
- {
-       struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
-@@ -1218,6 +1242,18 @@ static const struct dwcmshc_pltfm_data s
-       .postinit = dwcmshc_rk35xx_postinit,
- };
-+static const struct dwcmshc_pltfm_data sdhci_dwcmshc_rk3576_pdata = {
-+      .pdata = {
-+              .ops = &sdhci_dwcmshc_rk35xx_ops,
-+              .quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN |
-+                        SDHCI_QUIRK_BROKEN_TIMEOUT_VAL,
-+              .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
-+                         SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN,
-+      },
-+      .init = dwcmshc_rk35xx_init,
-+      .postinit = dwcmshc_rk3576_postinit,
-+};
-+
- static const struct dwcmshc_pltfm_data sdhci_dwcmshc_th1520_pdata = {
-       .pdata = {
-               .ops = &sdhci_dwcmshc_th1520_ops,
-@@ -1317,6 +1353,10 @@ static const struct of_device_id sdhci_d
-               .data = &sdhci_dwcmshc_rk35xx_pdata,
-       },
-       {
-+              .compatible = "rockchip,rk3576-dwcmshc",
-+              .data = &sdhci_dwcmshc_rk3576_pdata,
-+      },
-+      {
-               .compatible = "rockchip,rk3568-dwcmshc",
-               .data = &sdhci_dwcmshc_rk35xx_pdata,
-       },
index 804e509e6623d40cc38fe950420a8c37dad2d165..d374ade235d4fbe85be8ebef8a4470216072d61c 100644 (file)
@@ -589,7 +589,6 @@ can-kvaser_pciefd-continue-parsing-dma-buf-after-dropped-rx.patch
 can-kvaser_pciefd-fix-echo_skb-race.patch
 net-dsa-microchip-linearize-skb-for-tail-tagging-switches.patch
 vmxnet3-update-mtu-after-device-quiesce.patch
-mmc-sdhci-of-dwcmshc-add-pd-workaround-on-rk3576.patch
 pmdomain-renesas-rcar-remove-obsolete-nullify-checks.patch
 pmdomain-core-fix-error-checking-in-genpd_dev_pm_attach_by_id.patch
 platform-x86-dell-wmi-sysman-avoid-buffer-overflow-in-current_password_store.patch
diff --git a/queue-6.14/mmc-sdhci-of-dwcmshc-add-pd-workaround-on-rk3576.patch b/queue-6.14/mmc-sdhci-of-dwcmshc-add-pd-workaround-on-rk3576.patch
deleted file mode 100644 (file)
index 9f01197..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-From 08f959759e1e6e9c4b898c51a7d387ac3480630b Mon Sep 17 00:00:00 2001
-From: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
-Date: Wed, 23 Apr 2025 09:53:32 +0200
-Subject: mmc: sdhci-of-dwcmshc: add PD workaround on RK3576
-
-From: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
-
-commit 08f959759e1e6e9c4b898c51a7d387ac3480630b upstream.
-
-RK3576's power domains have a peculiar design where the PD_NVM power
-domain, of which the sdhci controller is a part, seemingly does not have
-idempotent runtime disable/enable. The end effect is that if PD_NVM gets
-turned off by the generic power domain logic because all the devices
-depending on it are suspended, then the next time the sdhci device is
-unsuspended, it'll hang the SoC as soon as it tries accessing the CQHCI
-registers.
-
-RK3576's UFS support needed a new dev_pm_genpd_rpm_always_on function
-added to the generic power domains API to handle what appears to be a
-similar hardware design.
-
-Use this new function to ask for the same treatment in the sdhci
-controller by giving rk3576 its own platform data with its own postinit
-function. The benefit of doing this instead of marking the power domains
-always on in the power domain core is that we only do this if we know
-the platform we're running on actually uses the sdhci controller. For
-others, keeping PD_NVM always on would be a waste, as they won't run
-into this specific issue. The only other IP in PD_NVM that could be
-affected is FSPI0. If it gets a mainline driver, it will probably want
-to do the same thing.
-
-Acked-by: Adrian Hunter <adrian.hunter@intel.com>
-Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
-Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
-Fixes: cfee1b507758 ("pmdomain: rockchip: Add support for RK3576 SoC")
-Cc: <stable@vger.kernel.org> # v6.15+
-Link: https://lore.kernel.org/r/20250423-rk3576-emmc-fix-v3-1-0bf80e29967f@collabora.com
-Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/mmc/host/sdhci-of-dwcmshc.c |   40 ++++++++++++++++++++++++++++++++++++
- 1 file changed, 40 insertions(+)
-
---- a/drivers/mmc/host/sdhci-of-dwcmshc.c
-+++ b/drivers/mmc/host/sdhci-of-dwcmshc.c
-@@ -17,6 +17,7 @@
- #include <linux/module.h>
- #include <linux/of.h>
- #include <linux/platform_device.h>
-+#include <linux/pm_domain.h>
- #include <linux/pm_runtime.h>
- #include <linux/reset.h>
- #include <linux/sizes.h>
-@@ -787,6 +788,29 @@ static void dwcmshc_rk35xx_postinit(stru
-       }
- }
-+static void dwcmshc_rk3576_postinit(struct sdhci_host *host, struct dwcmshc_priv *dwc_priv)
-+{
-+      struct device *dev = mmc_dev(host->mmc);
-+      int ret;
-+
-+      /*
-+       * This works around the design of the RK3576's power domains, which
-+       * makes the PD_NVM power domain, which the sdhci controller on the
-+       * RK3576 is in, never come back the same way once it's run-time
-+       * suspended once. This can happen during early kernel boot if no driver
-+       * is using either PD_NVM or its child power domain PD_SDGMAC for a
-+       * short moment, leading to it being turned off to save power. By
-+       * keeping it on, sdhci suspending won't lead to PD_NVM becoming a
-+       * candidate for getting turned off.
-+       */
-+      ret = dev_pm_genpd_rpm_always_on(dev, true);
-+      if (ret && ret != -EOPNOTSUPP)
-+              dev_warn(dev, "failed to set PD rpm always on, SoC may hang later: %pe\n",
-+                       ERR_PTR(ret));
-+
-+      dwcmshc_rk35xx_postinit(host, dwc_priv);
-+}
-+
- static int th1520_execute_tuning(struct sdhci_host *host, u32 opcode)
- {
-       struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
-@@ -1218,6 +1242,18 @@ static const struct dwcmshc_pltfm_data s
-       .postinit = dwcmshc_rk35xx_postinit,
- };
-+static const struct dwcmshc_pltfm_data sdhci_dwcmshc_rk3576_pdata = {
-+      .pdata = {
-+              .ops = &sdhci_dwcmshc_rk35xx_ops,
-+              .quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN |
-+                        SDHCI_QUIRK_BROKEN_TIMEOUT_VAL,
-+              .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
-+                         SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN,
-+      },
-+      .init = dwcmshc_rk35xx_init,
-+      .postinit = dwcmshc_rk3576_postinit,
-+};
-+
- static const struct dwcmshc_pltfm_data sdhci_dwcmshc_th1520_pdata = {
-       .pdata = {
-               .ops = &sdhci_dwcmshc_th1520_ops,
-@@ -1317,6 +1353,10 @@ static const struct of_device_id sdhci_d
-               .data = &sdhci_dwcmshc_rk35xx_pdata,
-       },
-       {
-+              .compatible = "rockchip,rk3576-dwcmshc",
-+              .data = &sdhci_dwcmshc_rk3576_pdata,
-+      },
-+      {
-               .compatible = "rockchip,rk3568-dwcmshc",
-               .data = &sdhci_dwcmshc_rk35xx_pdata,
-       },
index e06cb7008d3ed0f60681ba4df554b2f3ef2703f2..d42d37220a1e7baa2640f3e7fb0d4383996f0de7 100644 (file)
@@ -743,7 +743,6 @@ io_uring-net-only-retry-recv-bundle-for-a-full-transfer.patch
 net-dsa-microchip-linearize-skb-for-tail-tagging-switches.patch
 vmxnet3-update-mtu-after-device-quiesce.patch
 mmc-sdhci_am654-add-sdhci_quirk2_suppress_v1p8_ena-quirk-to-am62-compatible.patch
-mmc-sdhci-of-dwcmshc-add-pd-workaround-on-rk3576.patch
 pmdomain-renesas-rcar-remove-obsolete-nullify-checks.patch
 pmdomain-core-fix-error-checking-in-genpd_dev_pm_attach_by_id.patch
 platform-x86-dell-wmi-sysman-avoid-buffer-overflow-in-current_password_store.patch