]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop some xdmac driver patches from 5.15.y and 6.1.y
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Jun 2023 14:35:31 +0000 (15:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Jun 2023 14:35:31 +0000 (15:35 +0100)
they broke the build and the backports weren't quite right.

queue-5.15/dmaengine-at_xdmac-disable-enable-clock-directly-on-.patch [deleted file]
queue-5.15/dmaengine-at_xdmac-do-not-resume-channels-paused-by-.patch [deleted file]
queue-5.15/dmaengine-at_xdmac-move-the-free-desc-to-the-tail-of.patch [deleted file]
queue-5.15/dmaengine-at_xdmac-remove-a-level-of-indentation-in-.patch [deleted file]
queue-5.15/dmaengine-at_xdmac-restore-the-content-of-grws-regis.patch [deleted file]
queue-5.15/series
queue-6.1/dmaengine-at_xdmac-disable-enable-clock-directly-on-.patch [deleted file]
queue-6.1/dmaengine-at_xdmac-do-not-resume-channels-paused-by-.patch [deleted file]
queue-6.1/dmaengine-at_xdmac-restore-the-content-of-grws-regis.patch [deleted file]
queue-6.1/series

diff --git a/queue-5.15/dmaengine-at_xdmac-disable-enable-clock-directly-on-.patch b/queue-5.15/dmaengine-at_xdmac-disable-enable-clock-directly-on-.patch
deleted file mode 100644 (file)
index 58df9c5..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-From 024bbf116ed34702a8bfa8f983a0b6fed9194a38 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Tue, 14 Feb 2023 17:18:21 +0200
-Subject: dmaengine: at_xdmac: disable/enable clock directly on suspend/resume
-
-From: Claudiu Beznea <claudiu.beznea@microchip.com>
-
-[ Upstream commit 2de5ddb5e68c94b781b3789bca1ce52000d7d0e0 ]
-
-Runtime PM APIs for at_xdmac just plays with clk_enable()/clk_disable()
-letting aside the clk_prepare()/clk_unprepare() that needs to be
-executed as the clock is also prepared on probe. Thus instead of using
-runtime PM force suspend/resume APIs use
-clk_disable_unprepare() + pm_runtime_put_noidle() on suspend and
-clk_prepare_enable() + pm_runtime_get_noresume() on resume. This
-approach as been chosen instead of using runtime PM force suspend/resume
-with clk_unprepare()/clk_prepare() as it looks simpler and the final
-code is better.
-
-While at it added the missing pm_runtime_mark_last_busy() on suspend before
-decrementing the reference counter.
-
-Fixes: 650b0e990cbd ("dmaengine: at_xdmac: add runtime pm support")
-Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
-Link: https://lore.kernel.org/r/20230214151827.1050280-2-claudiu.beznea@microchip.com
-Signed-off-by: Vinod Koul <vkoul@kernel.org>
-Stable-dep-of: 44fe8440bda5 ("dmaengine: at_xdmac: do not resume channels paused by consumers")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/dma/at_xdmac.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
-index f9aa5396c0f8e..af52429af9172 100644
---- a/drivers/dma/at_xdmac.c
-+++ b/drivers/dma/at_xdmac.c
-@@ -1992,6 +1992,7 @@ static int atmel_xdmac_suspend(struct device *dev)
-       at_xdmac_off(atxdmac);
-       clk_disable_unprepare(atxdmac->clk);
-+
-       return 0;
- }
-@@ -2008,6 +2009,8 @@ static int atmel_xdmac_resume(struct device *dev)
-       if (ret)
-               return ret;
-+      pm_runtime_get_noresume(atxdmac->dev);
-+
-       at_xdmac_axi_config(pdev);
-       /* Clear pending interrupts. */
--- 
-2.39.2
-
diff --git a/queue-5.15/dmaengine-at_xdmac-do-not-resume-channels-paused-by-.patch b/queue-5.15/dmaengine-at_xdmac-do-not-resume-channels-paused-by-.patch
deleted file mode 100644 (file)
index 160bd33..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-From 15b8174c6745a9adccbc11ac92f38dcd867f0b3b Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Tue, 14 Feb 2023 17:18:23 +0200
-Subject: dmaengine: at_xdmac: do not resume channels paused by consumers
-
-From: Claudiu Beznea <claudiu.beznea@microchip.com>
-
-[ Upstream commit 44fe8440bda545b5d167329df88c47609a645168 ]
-
-In case there are DMA channels not paused by consumers in suspend
-process (valid on AT91 SoCs for serial driver when no_console_suspend) the
-driver pauses them (using at_xdmac_device_pause() which is also the same
-function called by dmaengine_pause()) and then in the resume process the
-driver resumes them calling at_xdmac_device_resume() which is the same
-function called by dmaengine_resume()). This is good for DMA channels
-not paused by consumers but for drivers that calls
-dmaengine_pause()/dmaegine_resume() on suspend/resume path this may lead to
-DMA channel being enabled before the IP is enabled. For IPs that needs
-strict ordering with regards to DMA channel enablement this will lead to
-wrong behavior. To fix this add a new set of functions
-at_xdmac_device_pause_internal()/at_xdmac_device_resume_internal() to be
-called only on suspend/resume.
-
-Fixes: e1f7c9eee707 ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver")
-Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
-Link: https://lore.kernel.org/r/20230214151827.1050280-4-claudiu.beznea@microchip.com
-Signed-off-by: Vinod Koul <vkoul@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/dma/at_xdmac.c | 48 ++++++++++++++++++++++++++++++++++++------
- 1 file changed, 42 insertions(+), 6 deletions(-)
-
-diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
-index af52429af9172..4965961f55aa2 100644
---- a/drivers/dma/at_xdmac.c
-+++ b/drivers/dma/at_xdmac.c
-@@ -186,6 +186,7 @@
- enum atc_status {
-       AT_XDMAC_CHAN_IS_CYCLIC = 0,
-       AT_XDMAC_CHAN_IS_PAUSED,
-+      AT_XDMAC_CHAN_IS_PAUSED_INTERNAL,
- };
- struct at_xdmac_layout {
-@@ -346,6 +347,11 @@ static inline int at_xdmac_chan_is_paused(struct at_xdmac_chan *atchan)
-       return test_bit(AT_XDMAC_CHAN_IS_PAUSED, &atchan->status);
- }
-+static inline int at_xdmac_chan_is_paused_internal(struct at_xdmac_chan *atchan)
-+{
-+      return test_bit(AT_XDMAC_CHAN_IS_PAUSED_INTERNAL, &atchan->status);
-+}
-+
- static inline bool at_xdmac_chan_is_peripheral_xfer(u32 cfg)
- {
-       return cfg & AT_XDMAC_CC_TYPE_PER_TRAN;
-@@ -1801,6 +1807,26 @@ static int at_xdmac_device_config(struct dma_chan *chan,
-       return ret;
- }
-+static void at_xdmac_device_pause_set(struct at_xdmac *atxdmac,
-+                                    struct at_xdmac_chan *atchan)
-+{
-+      at_xdmac_write(atxdmac, atxdmac->layout->grws, atchan->mask);
-+      while (at_xdmac_chan_read(atchan, AT_XDMAC_CC) &
-+             (AT_XDMAC_CC_WRIP | AT_XDMAC_CC_RDIP))
-+              cpu_relax();
-+}
-+
-+static void at_xdmac_device_pause_internal(struct at_xdmac_chan *atchan)
-+{
-+      struct at_xdmac         *atxdmac = to_at_xdmac(atchan->chan.device);
-+      unsigned long           flags;
-+
-+      spin_lock_irqsave(&atchan->lock, flags);
-+      set_bit(AT_XDMAC_CHAN_IS_PAUSED_INTERNAL, &atchan->status);
-+      at_xdmac_device_pause_set(atxdmac, atchan);
-+      spin_unlock_irqrestore(&atchan->lock, flags);
-+}
-+
- static int at_xdmac_device_pause(struct dma_chan *chan)
- {
-       struct at_xdmac_chan    *atchan = to_at_xdmac_chan(chan);
-@@ -1813,15 +1839,25 @@ static int at_xdmac_device_pause(struct dma_chan *chan)
-               return 0;
-       spin_lock_irqsave(&atchan->lock, flags);
--      at_xdmac_write(atxdmac, atxdmac->layout->grws, atchan->mask);
--      while (at_xdmac_chan_read(atchan, AT_XDMAC_CC)
--             & (AT_XDMAC_CC_WRIP | AT_XDMAC_CC_RDIP))
--              cpu_relax();
-+
-+      at_xdmac_device_pause_set(atxdmac, atchan);
-+      /* Decrement runtime PM ref counter for each active descriptor. */
-       spin_unlock_irqrestore(&atchan->lock, flags);
-       return 0;
- }
-+static void at_xdmac_device_resume_internal(struct at_xdmac_chan *atchan)
-+{
-+      struct at_xdmac         *atxdmac = to_at_xdmac(atchan->chan.device);
-+      unsigned long           flags;
-+
-+      spin_lock_irqsave(&atchan->lock, flags);
-+      at_xdmac_write(atxdmac, atxdmac->layout->grwr, atchan->mask);
-+      clear_bit(AT_XDMAC_CHAN_IS_PAUSED_INTERNAL, &atchan->status);
-+      spin_unlock_irqrestore(&atchan->lock, flags);
-+}
-+
- static int at_xdmac_device_resume(struct dma_chan *chan)
- {
-       struct at_xdmac_chan    *atchan = to_at_xdmac_chan(chan);
-@@ -1981,7 +2017,7 @@ static int atmel_xdmac_suspend(struct device *dev)
-               atchan->save_cc = at_xdmac_chan_read(atchan, AT_XDMAC_CC);
-               if (at_xdmac_chan_is_cyclic(atchan)) {
-                       if (!at_xdmac_chan_is_paused(atchan))
--                              at_xdmac_device_pause(chan);
-+                              at_xdmac_device_pause_internal(atchan);
-                       atchan->save_cim = at_xdmac_chan_read(atchan, AT_XDMAC_CIM);
-                       atchan->save_cnda = at_xdmac_chan_read(atchan, AT_XDMAC_CNDA);
-                       atchan->save_cndc = at_xdmac_chan_read(atchan, AT_XDMAC_CNDC);
-@@ -2026,7 +2062,7 @@ static int atmel_xdmac_resume(struct device *dev)
-               at_xdmac_chan_write(atchan, AT_XDMAC_CC, atchan->save_cc);
-               if (at_xdmac_chan_is_cyclic(atchan)) {
-                       if (at_xdmac_chan_is_paused(atchan))
--                              at_xdmac_device_resume(chan);
-+                              at_xdmac_device_resume_internal(atchan);
-                       at_xdmac_chan_write(atchan, AT_XDMAC_CNDA, atchan->save_cnda);
-                       at_xdmac_chan_write(atchan, AT_XDMAC_CNDC, atchan->save_cndc);
-                       at_xdmac_chan_write(atchan, AT_XDMAC_CIE, atchan->save_cim);
--- 
-2.39.2
-
diff --git a/queue-5.15/dmaengine-at_xdmac-move-the-free-desc-to-the-tail-of.patch b/queue-5.15/dmaengine-at_xdmac-move-the-free-desc-to-the-tail-of.patch
deleted file mode 100644 (file)
index c3528ed..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-From c4756066793ffa30d7265aef3b158e6076186a7e Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 15 Dec 2021 13:01:09 +0200
-Subject: dmaengine: at_xdmac: Move the free desc to the tail of the desc list
-
-From: Tudor Ambarus <tudor.ambarus@microchip.com>
-
-[ Upstream commit 801db90bf294f647b967e8d99b9ae121bea63d0d ]
-
-Move the free desc to the tail of the list, so that the sequence of
-descriptors is more track-able in case of debug. One would know which
-descriptor should come next and could easier catch concurrency over
-descriptors for example. virt-dma uses list_splice_tail_init() as well,
-follow the core driver.
-
-Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
-Link: https://lore.kernel.org/r/20211215110115.191749-7-tudor.ambarus@microchip.com
-Signed-off-by: Vinod Koul <vkoul@kernel.org>
-Stable-dep-of: 44fe8440bda5 ("dmaengine: at_xdmac: do not resume channels paused by consumers")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/dma/at_xdmac.c | 23 ++++++++++++++---------
- 1 file changed, 14 insertions(+), 9 deletions(-)
-
-diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
-index 80c609aa2a91c..b45437aab1434 100644
---- a/drivers/dma/at_xdmac.c
-+++ b/drivers/dma/at_xdmac.c
-@@ -732,7 +732,8 @@ at_xdmac_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
-               if (!desc) {
-                       dev_err(chan2dev(chan), "can't get descriptor\n");
-                       if (first)
--                              list_splice_init(&first->descs_list, &atchan->free_descs_list);
-+                              list_splice_tail_init(&first->descs_list,
-+                                                    &atchan->free_descs_list);
-                       goto spin_unlock;
-               }
-@@ -820,7 +821,8 @@ at_xdmac_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr,
-               if (!desc) {
-                       dev_err(chan2dev(chan), "can't get descriptor\n");
-                       if (first)
--                              list_splice_init(&first->descs_list, &atchan->free_descs_list);
-+                              list_splice_tail_init(&first->descs_list,
-+                                                    &atchan->free_descs_list);
-                       spin_unlock_irqrestore(&atchan->lock, irqflags);
-                       return NULL;
-               }
-@@ -1054,8 +1056,8 @@ at_xdmac_prep_interleaved(struct dma_chan *chan,
-                                                              src_addr, dst_addr,
-                                                              xt, chunk);
-                       if (!desc) {
--                              list_splice_init(&first->descs_list,
--                                               &atchan->free_descs_list);
-+                              list_splice_tail_init(&first->descs_list,
-+                                                    &atchan->free_descs_list);
-                               return NULL;
-                       }
-@@ -1135,7 +1137,8 @@ at_xdmac_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
-               if (!desc) {
-                       dev_err(chan2dev(chan), "can't get descriptor\n");
-                       if (first)
--                              list_splice_init(&first->descs_list, &atchan->free_descs_list);
-+                              list_splice_tail_init(&first->descs_list,
-+                                                    &atchan->free_descs_list);
-                       return NULL;
-               }
-@@ -1311,8 +1314,8 @@ at_xdmac_prep_dma_memset_sg(struct dma_chan *chan, struct scatterlist *sgl,
-                                                  sg_dma_len(sg),
-                                                  value);
-               if (!desc && first)
--                      list_splice_init(&first->descs_list,
--                                       &atchan->free_descs_list);
-+                      list_splice_tail_init(&first->descs_list,
-+                                            &atchan->free_descs_list);
-               if (!first)
-                       first = desc;
-@@ -1709,7 +1712,8 @@ static void at_xdmac_tasklet(struct tasklet_struct *t)
-               spin_lock_irq(&atchan->lock);
-               /* Move the xfer descriptors into the free descriptors list. */
--              list_splice_init(&desc->descs_list, &atchan->free_descs_list);
-+              list_splice_tail_init(&desc->descs_list,
-+                                    &atchan->free_descs_list);
-               at_xdmac_advance_work(atchan);
-               spin_unlock_irq(&atchan->lock);
-       }
-@@ -1858,7 +1862,8 @@ static int at_xdmac_device_terminate_all(struct dma_chan *chan)
-       /* Cancel all pending transfers. */
-       list_for_each_entry_safe(desc, _desc, &atchan->xfers_list, xfer_node) {
-               list_del(&desc->xfer_node);
--              list_splice_init(&desc->descs_list, &atchan->free_descs_list);
-+              list_splice_tail_init(&desc->descs_list,
-+                                    &atchan->free_descs_list);
-       }
-       clear_bit(AT_XDMAC_CHAN_IS_PAUSED, &atchan->status);
--- 
-2.39.2
-
diff --git a/queue-5.15/dmaengine-at_xdmac-remove-a-level-of-indentation-in-.patch b/queue-5.15/dmaengine-at_xdmac-remove-a-level-of-indentation-in-.patch
deleted file mode 100644 (file)
index a742406..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-From 15801e22ff52f67f250cef04d8fdd46de1799b55 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 15 Dec 2021 13:01:14 +0200
-Subject: dmaengine: at_xdmac: Remove a level of indentation in
- at_xdmac_tasklet()
-
-From: Tudor Ambarus <tudor.ambarus@microchip.com>
-
-[ Upstream commit a61210cae80cac0701d5aca9551466a389717fd2 ]
-
-Apart of making the code easier to read, this patch is a prerequisite for
-a functional change: tasklets run with interrupts enabled, so we need to
-protect atchan->irq_status with spin_lock_irq() otherwise the tasklet can
-be interrupted by the IRQ that modifies irq_status. atchan->irq_status
-will be protected in a further patch.
-
-Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
-Link: https://lore.kernel.org/r/20211215110115.191749-12-tudor.ambarus@microchip.com
-Signed-off-by: Vinod Koul <vkoul@kernel.org>
-Stable-dep-of: 44fe8440bda5 ("dmaengine: at_xdmac: do not resume channels paused by consumers")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/dma/at_xdmac.c | 66 ++++++++++++++++++++----------------------
- 1 file changed, 32 insertions(+), 34 deletions(-)
-
-diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
-index b45437aab1434..f9aa5396c0f8e 100644
---- a/drivers/dma/at_xdmac.c
-+++ b/drivers/dma/at_xdmac.c
-@@ -1670,53 +1670,51 @@ static void at_xdmac_tasklet(struct tasklet_struct *t)
- {
-       struct at_xdmac_chan    *atchan = from_tasklet(atchan, t, tasklet);
-       struct at_xdmac_desc    *desc;
-+      struct dma_async_tx_descriptor *txd;
-       u32                     error_mask;
-       dev_dbg(chan2dev(&atchan->chan), "%s: status=0x%08x\n",
-               __func__, atchan->irq_status);
--      error_mask = AT_XDMAC_CIS_RBEIS
--                   | AT_XDMAC_CIS_WBEIS
--                   | AT_XDMAC_CIS_ROIS;
-+      if (at_xdmac_chan_is_cyclic(atchan))
-+              return at_xdmac_handle_cyclic(atchan);
--      if (at_xdmac_chan_is_cyclic(atchan)) {
--              at_xdmac_handle_cyclic(atchan);
--      } else if ((atchan->irq_status & AT_XDMAC_CIS_LIS)
--                 || (atchan->irq_status & error_mask)) {
--              struct dma_async_tx_descriptor  *txd;
-+      error_mask = AT_XDMAC_CIS_RBEIS | AT_XDMAC_CIS_WBEIS |
-+              AT_XDMAC_CIS_ROIS;
--              if (atchan->irq_status & error_mask)
--                      at_xdmac_handle_error(atchan);
-+      if (!(atchan->irq_status & AT_XDMAC_CIS_LIS) &&
-+          !(atchan->irq_status & error_mask))
-+              return;
--              spin_lock_irq(&atchan->lock);
--              desc = list_first_entry(&atchan->xfers_list,
--                                      struct at_xdmac_desc,
--                                      xfer_node);
--              dev_vdbg(chan2dev(&atchan->chan), "%s: desc 0x%p\n", __func__, desc);
--              if (!desc->active_xfer) {
--                      dev_err(chan2dev(&atchan->chan), "Xfer not active: exiting");
--                      spin_unlock_irq(&atchan->lock);
--                      return;
--              }
-+      if (atchan->irq_status & error_mask)
-+              at_xdmac_handle_error(atchan);
--              txd = &desc->tx_dma_desc;
--              dma_cookie_complete(txd);
--              /* Remove the transfer from the transfer list. */
--              list_del(&desc->xfer_node);
-+      spin_lock_irq(&atchan->lock);
-+      desc = list_first_entry(&atchan->xfers_list, struct at_xdmac_desc,
-+                              xfer_node);
-+      dev_vdbg(chan2dev(&atchan->chan), "%s: desc 0x%p\n", __func__, desc);
-+      if (!desc->active_xfer) {
-+              dev_err(chan2dev(&atchan->chan), "Xfer not active: exiting");
-               spin_unlock_irq(&atchan->lock);
-+              return;
-+      }
--              if (txd->flags & DMA_PREP_INTERRUPT)
--                      dmaengine_desc_get_callback_invoke(txd, NULL);
-+      txd = &desc->tx_dma_desc;
-+      dma_cookie_complete(txd);
-+      /* Remove the transfer from the transfer list. */
-+      list_del(&desc->xfer_node);
-+      spin_unlock_irq(&atchan->lock);
--              dma_run_dependencies(txd);
-+      if (txd->flags & DMA_PREP_INTERRUPT)
-+              dmaengine_desc_get_callback_invoke(txd, NULL);
--              spin_lock_irq(&atchan->lock);
--              /* Move the xfer descriptors into the free descriptors list. */
--              list_splice_tail_init(&desc->descs_list,
--                                    &atchan->free_descs_list);
--              at_xdmac_advance_work(atchan);
--              spin_unlock_irq(&atchan->lock);
--      }
-+      dma_run_dependencies(txd);
-+
-+      spin_lock_irq(&atchan->lock);
-+      /* Move the xfer descriptors into the free descriptors list. */
-+      list_splice_tail_init(&desc->descs_list, &atchan->free_descs_list);
-+      at_xdmac_advance_work(atchan);
-+      spin_unlock_irq(&atchan->lock);
- }
- static irqreturn_t at_xdmac_interrupt(int irq, void *dev_id)
--- 
-2.39.2
-
diff --git a/queue-5.15/dmaengine-at_xdmac-restore-the-content-of-grws-regis.patch b/queue-5.15/dmaengine-at_xdmac-restore-the-content-of-grws-regis.patch
deleted file mode 100644 (file)
index dd7428d..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-From 8aea70b579cb012b7be3da86bef668398d4a3ddf Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Tue, 14 Feb 2023 17:18:24 +0200
-Subject: dmaengine: at_xdmac: restore the content of grws register
-
-From: Claudiu Beznea <claudiu.beznea@microchip.com>
-
-[ Upstream commit 7c5eb63d16b01c202aaa95f374ae15a807745a73 ]
-
-In case the system suspends to a deep sleep state where power to DMA
-controller is cut-off we need to restore the content of GRWS register.
-This is a write only register and writing bit X tells the controller
-to suspend read and write requests for channel X. Thus set GRWS before
-restoring the content of GE (Global Enable) regiter.
-
-Fixes: e1f7c9eee707 ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver")
-Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
-Link: https://lore.kernel.org/r/20230214151827.1050280-5-claudiu.beznea@microchip.com
-Signed-off-by: Vinod Koul <vkoul@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/dma/at_xdmac.c | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
-index 4965961f55aa2..66bf570a8bd98 100644
---- a/drivers/dma/at_xdmac.c
-+++ b/drivers/dma/at_xdmac.c
-@@ -2063,6 +2063,15 @@ static int atmel_xdmac_resume(struct device *dev)
-               if (at_xdmac_chan_is_cyclic(atchan)) {
-                       if (at_xdmac_chan_is_paused(atchan))
-                               at_xdmac_device_resume_internal(atchan);
-+
-+                      /*
-+                       * We may resume from a deep sleep state where power
-+                       * to DMA controller is cut-off. Thus, restore the
-+                       * suspend state of channels set though dmaengine API.
-+                       */
-+                      else if (at_xdmac_chan_is_paused(atchan))
-+                              at_xdmac_device_pause_set(atxdmac, atchan);
-+
-                       at_xdmac_chan_write(atchan, AT_XDMAC_CNDA, atchan->save_cnda);
-                       at_xdmac_chan_write(atchan, AT_XDMAC_CNDC, atchan->save_cndc);
-                       at_xdmac_chan_write(atchan, AT_XDMAC_CIE, atchan->save_cim);
--- 
-2.39.2
-
index dc5c102e82d3f742f88741e08f127a1dba88aff1..f79da4072a5ddd5a5bb772c0e10a4fd2111f71ba 100644 (file)
@@ -11,11 +11,6 @@ net-mlx5-devcom-serialize-devcom-registration.patch
 platform-x86-isst-punit-device-mapping-with-sub-numa.patch
 platform-x86-isst-remove-8-socket-limit.patch
 net-phy-mscc-enable-vsc8501-2-rgmii-rx-clock.patch
-dmaengine-at_xdmac-move-the-free-desc-to-the-tail-of.patch
-dmaengine-at_xdmac-remove-a-level-of-indentation-in-.patch
-dmaengine-at_xdmac-disable-enable-clock-directly-on-.patch
-dmaengine-at_xdmac-do-not-resume-channels-paused-by-.patch
-dmaengine-at_xdmac-restore-the-content-of-grws-regis.patch
 kvm-s390-pv-add-export-before-import.patch
 kvm-s390-fix-race-in-gmap_make_secure.patch
 net-dsa-introduce-helpers-for-iterating-through-port.patch
diff --git a/queue-6.1/dmaengine-at_xdmac-disable-enable-clock-directly-on-.patch b/queue-6.1/dmaengine-at_xdmac-disable-enable-clock-directly-on-.patch
deleted file mode 100644 (file)
index d52d7f9..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-From 573ebc5490ed734daba324fb737cd5b90b155138 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Tue, 14 Feb 2023 17:18:21 +0200
-Subject: dmaengine: at_xdmac: disable/enable clock directly on suspend/resume
-
-From: Claudiu Beznea <claudiu.beznea@microchip.com>
-
-[ Upstream commit 2de5ddb5e68c94b781b3789bca1ce52000d7d0e0 ]
-
-Runtime PM APIs for at_xdmac just plays with clk_enable()/clk_disable()
-letting aside the clk_prepare()/clk_unprepare() that needs to be
-executed as the clock is also prepared on probe. Thus instead of using
-runtime PM force suspend/resume APIs use
-clk_disable_unprepare() + pm_runtime_put_noidle() on suspend and
-clk_prepare_enable() + pm_runtime_get_noresume() on resume. This
-approach as been chosen instead of using runtime PM force suspend/resume
-with clk_unprepare()/clk_prepare() as it looks simpler and the final
-code is better.
-
-While at it added the missing pm_runtime_mark_last_busy() on suspend before
-decrementing the reference counter.
-
-Fixes: 650b0e990cbd ("dmaengine: at_xdmac: add runtime pm support")
-Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
-Link: https://lore.kernel.org/r/20230214151827.1050280-2-claudiu.beznea@microchip.com
-Signed-off-by: Vinod Koul <vkoul@kernel.org>
-Stable-dep-of: 44fe8440bda5 ("dmaengine: at_xdmac: do not resume channels paused by consumers")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/dma/at_xdmac.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
-index bfc8ae2143957..7f7557e4c31d7 100644
---- a/drivers/dma/at_xdmac.c
-+++ b/drivers/dma/at_xdmac.c
-@@ -1993,6 +1993,7 @@ static int __maybe_unused atmel_xdmac_suspend(struct device *dev)
-       at_xdmac_off(atxdmac);
-       clk_disable_unprepare(atxdmac->clk);
-+
-       return 0;
- }
-@@ -2009,6 +2010,8 @@ static int __maybe_unused atmel_xdmac_resume(struct device *dev)
-       if (ret)
-               return ret;
-+      pm_runtime_get_noresume(atxdmac->dev);
-+
-       at_xdmac_axi_config(pdev);
-       /* Clear pending interrupts. */
--- 
-2.39.2
-
diff --git a/queue-6.1/dmaengine-at_xdmac-do-not-resume-channels-paused-by-.patch b/queue-6.1/dmaengine-at_xdmac-do-not-resume-channels-paused-by-.patch
deleted file mode 100644 (file)
index 8bd7a62..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-From d532a33206f0551e79db35b0dcc35bca9dcb4beb Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Tue, 14 Feb 2023 17:18:23 +0200
-Subject: dmaengine: at_xdmac: do not resume channels paused by consumers
-
-From: Claudiu Beznea <claudiu.beznea@microchip.com>
-
-[ Upstream commit 44fe8440bda545b5d167329df88c47609a645168 ]
-
-In case there are DMA channels not paused by consumers in suspend
-process (valid on AT91 SoCs for serial driver when no_console_suspend) the
-driver pauses them (using at_xdmac_device_pause() which is also the same
-function called by dmaengine_pause()) and then in the resume process the
-driver resumes them calling at_xdmac_device_resume() which is the same
-function called by dmaengine_resume()). This is good for DMA channels
-not paused by consumers but for drivers that calls
-dmaengine_pause()/dmaegine_resume() on suspend/resume path this may lead to
-DMA channel being enabled before the IP is enabled. For IPs that needs
-strict ordering with regards to DMA channel enablement this will lead to
-wrong behavior. To fix this add a new set of functions
-at_xdmac_device_pause_internal()/at_xdmac_device_resume_internal() to be
-called only on suspend/resume.
-
-Fixes: e1f7c9eee707 ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver")
-Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
-Link: https://lore.kernel.org/r/20230214151827.1050280-4-claudiu.beznea@microchip.com
-Signed-off-by: Vinod Koul <vkoul@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/dma/at_xdmac.c | 48 ++++++++++++++++++++++++++++++++++++------
- 1 file changed, 42 insertions(+), 6 deletions(-)
-
-diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
-index 7f7557e4c31d7..cb1374b161291 100644
---- a/drivers/dma/at_xdmac.c
-+++ b/drivers/dma/at_xdmac.c
-@@ -186,6 +186,7 @@
- enum atc_status {
-       AT_XDMAC_CHAN_IS_CYCLIC = 0,
-       AT_XDMAC_CHAN_IS_PAUSED,
-+      AT_XDMAC_CHAN_IS_PAUSED_INTERNAL,
- };
- struct at_xdmac_layout {
-@@ -346,6 +347,11 @@ static inline int at_xdmac_chan_is_paused(struct at_xdmac_chan *atchan)
-       return test_bit(AT_XDMAC_CHAN_IS_PAUSED, &atchan->status);
- }
-+static inline int at_xdmac_chan_is_paused_internal(struct at_xdmac_chan *atchan)
-+{
-+      return test_bit(AT_XDMAC_CHAN_IS_PAUSED_INTERNAL, &atchan->status);
-+}
-+
- static inline bool at_xdmac_chan_is_peripheral_xfer(u32 cfg)
- {
-       return cfg & AT_XDMAC_CC_TYPE_PER_TRAN;
-@@ -1807,6 +1813,26 @@ static int at_xdmac_device_config(struct dma_chan *chan,
-       return ret;
- }
-+static void at_xdmac_device_pause_set(struct at_xdmac *atxdmac,
-+                                    struct at_xdmac_chan *atchan)
-+{
-+      at_xdmac_write(atxdmac, atxdmac->layout->grws, atchan->mask);
-+      while (at_xdmac_chan_read(atchan, AT_XDMAC_CC) &
-+             (AT_XDMAC_CC_WRIP | AT_XDMAC_CC_RDIP))
-+              cpu_relax();
-+}
-+
-+static void at_xdmac_device_pause_internal(struct at_xdmac_chan *atchan)
-+{
-+      struct at_xdmac         *atxdmac = to_at_xdmac(atchan->chan.device);
-+      unsigned long           flags;
-+
-+      spin_lock_irqsave(&atchan->lock, flags);
-+      set_bit(AT_XDMAC_CHAN_IS_PAUSED_INTERNAL, &atchan->status);
-+      at_xdmac_device_pause_set(atxdmac, atchan);
-+      spin_unlock_irqrestore(&atchan->lock, flags);
-+}
-+
- static int at_xdmac_device_pause(struct dma_chan *chan)
- {
-       struct at_xdmac_chan    *atchan = to_at_xdmac_chan(chan);
-@@ -1819,15 +1845,25 @@ static int at_xdmac_device_pause(struct dma_chan *chan)
-               return 0;
-       spin_lock_irqsave(&atchan->lock, flags);
--      at_xdmac_write(atxdmac, atxdmac->layout->grws, atchan->mask);
--      while (at_xdmac_chan_read(atchan, AT_XDMAC_CC)
--             & (AT_XDMAC_CC_WRIP | AT_XDMAC_CC_RDIP))
--              cpu_relax();
-+
-+      at_xdmac_device_pause_set(atxdmac, atchan);
-+      /* Decrement runtime PM ref counter for each active descriptor. */
-       spin_unlock_irqrestore(&atchan->lock, flags);
-       return 0;
- }
-+static void at_xdmac_device_resume_internal(struct at_xdmac_chan *atchan)
-+{
-+      struct at_xdmac         *atxdmac = to_at_xdmac(atchan->chan.device);
-+      unsigned long           flags;
-+
-+      spin_lock_irqsave(&atchan->lock, flags);
-+      at_xdmac_write(atxdmac, atxdmac->layout->grwr, atchan->mask);
-+      clear_bit(AT_XDMAC_CHAN_IS_PAUSED_INTERNAL, &atchan->status);
-+      spin_unlock_irqrestore(&atchan->lock, flags);
-+}
-+
- static int at_xdmac_device_resume(struct dma_chan *chan)
- {
-       struct at_xdmac_chan    *atchan = to_at_xdmac_chan(chan);
-@@ -1982,7 +2018,7 @@ static int __maybe_unused atmel_xdmac_suspend(struct device *dev)
-               atchan->save_cc = at_xdmac_chan_read(atchan, AT_XDMAC_CC);
-               if (at_xdmac_chan_is_cyclic(atchan)) {
-                       if (!at_xdmac_chan_is_paused(atchan))
--                              at_xdmac_device_pause(chan);
-+                              at_xdmac_device_pause_internal(atchan);
-                       atchan->save_cim = at_xdmac_chan_read(atchan, AT_XDMAC_CIM);
-                       atchan->save_cnda = at_xdmac_chan_read(atchan, AT_XDMAC_CNDA);
-                       atchan->save_cndc = at_xdmac_chan_read(atchan, AT_XDMAC_CNDC);
-@@ -2027,7 +2063,7 @@ static int __maybe_unused atmel_xdmac_resume(struct device *dev)
-               at_xdmac_chan_write(atchan, AT_XDMAC_CC, atchan->save_cc);
-               if (at_xdmac_chan_is_cyclic(atchan)) {
-                       if (at_xdmac_chan_is_paused(atchan))
--                              at_xdmac_device_resume(chan);
-+                              at_xdmac_device_resume_internal(atchan);
-                       at_xdmac_chan_write(atchan, AT_XDMAC_CNDA, atchan->save_cnda);
-                       at_xdmac_chan_write(atchan, AT_XDMAC_CNDC, atchan->save_cndc);
-                       at_xdmac_chan_write(atchan, AT_XDMAC_CIE, atchan->save_cim);
--- 
-2.39.2
-
diff --git a/queue-6.1/dmaengine-at_xdmac-restore-the-content-of-grws-regis.patch b/queue-6.1/dmaengine-at_xdmac-restore-the-content-of-grws-regis.patch
deleted file mode 100644 (file)
index b90609d..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-From 5928229bf4726638572b676c906a107242a89c7a Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Tue, 14 Feb 2023 17:18:24 +0200
-Subject: dmaengine: at_xdmac: restore the content of grws register
-
-From: Claudiu Beznea <claudiu.beznea@microchip.com>
-
-[ Upstream commit 7c5eb63d16b01c202aaa95f374ae15a807745a73 ]
-
-In case the system suspends to a deep sleep state where power to DMA
-controller is cut-off we need to restore the content of GRWS register.
-This is a write only register and writing bit X tells the controller
-to suspend read and write requests for channel X. Thus set GRWS before
-restoring the content of GE (Global Enable) regiter.
-
-Fixes: e1f7c9eee707 ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver")
-Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
-Link: https://lore.kernel.org/r/20230214151827.1050280-5-claudiu.beznea@microchip.com
-Signed-off-by: Vinod Koul <vkoul@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/dma/at_xdmac.c | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
-index cb1374b161291..fc018b633822e 100644
---- a/drivers/dma/at_xdmac.c
-+++ b/drivers/dma/at_xdmac.c
-@@ -2064,6 +2064,15 @@ static int __maybe_unused atmel_xdmac_resume(struct device *dev)
-               if (at_xdmac_chan_is_cyclic(atchan)) {
-                       if (at_xdmac_chan_is_paused(atchan))
-                               at_xdmac_device_resume_internal(atchan);
-+
-+                      /*
-+                       * We may resume from a deep sleep state where power
-+                       * to DMA controller is cut-off. Thus, restore the
-+                       * suspend state of channels set though dmaengine API.
-+                       */
-+                      else if (at_xdmac_chan_is_paused(atchan))
-+                              at_xdmac_device_pause_set(atxdmac, atchan);
-+
-                       at_xdmac_chan_write(atchan, AT_XDMAC_CNDA, atchan->save_cnda);
-                       at_xdmac_chan_write(atchan, AT_XDMAC_CNDC, atchan->save_cndc);
-                       at_xdmac_chan_write(atchan, AT_XDMAC_CIE, atchan->save_cim);
--- 
-2.39.2
-
index ca83f24344549e670e79f23658dc695b7d68bf5c..d250c95211a8d5668958f3f62c36eefcae6849f0 100644 (file)
@@ -28,9 +28,6 @@ wifi-rtw89-correct-5-mhz-mask-setting.patch
 wifi-iwlwifi-mvm-support-wowlan-info-notification-ve.patch
 wifi-iwlwifi-mvm-fix-potential-memory-leak.patch
 rdma-rxe-fix-the-error-trying-to-register-non-static.patch
-dmaengine-at_xdmac-disable-enable-clock-directly-on-.patch
-dmaengine-at_xdmac-do-not-resume-channels-paused-by-.patch
-dmaengine-at_xdmac-restore-the-content-of-grws-regis.patch
 octeontx2-af-add-validation-for-lmac-type.patch
 drm-amd-don-t-allow-s0ix-on-apus-older-than-raven.patch
 bluetooth-add-cmd-validity-checks-at-the-start-of-hci_sock_ioctl.patch