diff options
author | Roger Quadros <rogerq@kernel.org> | 2022-12-06 11:44:17 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-12-07 20:17:31 -0800 |
commit | 24bc19b05f1fc29e55ec73df5345fe3571c48b15 (patch) | |
tree | 1722f98e4fb86ee19e4b119f5797f22ec28869d3 /drivers/net/dsa/microchip/ksz_common.h | |
parent | 1a014663e7dddb711566a9c9746200b187742092 (diff) |
net: ethernet: ti: am65-cpsw: Add suspend/resume support
Add PM handlers for System suspend/resume.
As DMA driver doesn't yet support suspend/resume we free up
the DMA channels at suspend and acquire and initialize them
at resume.
In this revised approach we do not free the TX/RX IRQs at
am65_cpsw_nuss_common_stop() as it causes problems.
We will now free them only on .suspend() as we need to release
the DMA channels (as DMA looses context) and re-acquiring
them on .resume() may not necessarily give us the same
IRQs.
To make this easier:
- introduce am65_cpsw_nuss_remove_rx_chns() which is
similar to am65_cpsw_nuss_remove_tx_chns(). These will
be invoked in pm.suspend() to release the DMA channels
and free up the IRQs.
- move napi_add() and request_irq() calls to
am65_cpsw_nuss_init_rx/tx_chns() so we can invoke them
in pm.resume() to acquire the DMA channels and IRQs.
As CPTS looses contect during suspend/resume, invoke the
necessary CPTS suspend/resume helpers.
ALE_CLEAR command is issued in cpsw_ale_start() so no need
to issue it before the call to cpsw_ale_start().
Signed-off-by: Roger Quadros <rogerq@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/dsa/microchip/ksz_common.h')
0 files changed, 0 insertions, 0 deletions