diff options
author | Vignesh Raghavendra <[email protected]> | 2023-03-29 21:23:49 +0530 |
---|---|---|
committer | Vinod Koul <[email protected]> | 2023-03-31 13:36:00 +0530 |
commit | fbe05149e40bc6891b1ed6097ac26dbaa32d2bf8 (patch) | |
tree | 839e25d8cce1f6289db90c334a291b111a142a29 /tools/perf/scripts/python | |
parent | 7511f28792c6c724cc584a42f3eeb2fa5af689c4 (diff) |
dmaengine: ti: k3-udma: Add system suspend/resume support
The K3 platforms configure the DMA resources with the
help of the TI's System Firmware's Device Manager(DM)
over TISCI. The group of DMA related Resource Manager[1]
TISCI messages includes: INTA, RINGACC, UDMAP, and PSI-L.
This configuration however, does not persist in the DM
after leaving from Suspend-to-RAM state. We have to restore
the DMA channel configuration over TISCI for all configured
channels when returning from suspend.
The TISCI resource management calls for each DMA type (UDMA,
PKTDMA, BCDMA) happen in device_free_chan_resources() and
device_alloc_chan_resources(). In pm_suspend() we store
the current udma_chan_config for channels that still have
attached clients and call device_free_chan_resources().
In pm_resume() restore the udma_channel_config from backup
and call device_alloc_chan_resources() for those channels.
Drivers like CPSW that use k3-udma-glue already do their own
DMA resource management so use the late system suspend/resume hooks.
[1] https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/index.html#resource-management-rm
Signed-off-by: Vignesh Raghavendra <[email protected]>
[[email protected]: Add patch description and config backup]
[[email protected]: Supend only channels with clients]
Signed-off-by: Georgi Vlaev <[email protected]>
Acked-by: Peter Ujfalusi <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions