diff options
| author | Frank Li <[email protected]> | 2024-04-18 16:04:28 +0000 |
|---|---|---|
| committer | Bjorn Helgaas <[email protected]> | 2024-07-09 23:20:15 +0000 |
| commit | e1a4ec1a9520bf048a7ee09f7f7a82b1d44750ac (patch) | |
| tree | 1f42c9fae6d0f7c4785ce7576a5496eba8196acf /drivers/pci/controller/dwc/pci-layerscape-ep.c | |
| parent | PCI: Add PCIE_MSG_CODE_PME_TURN_OFF message macro (diff) | |
| download | kernel-e1a4ec1a9520bf048a7ee09f7f7a82b1d44750ac.tar.gz kernel-e1a4ec1a9520bf048a7ee09f7f7a82b1d44750ac.zip | |
PCI: dwc: Add generic MSG TLP support for sending PME_Turn_Off when system suspend
Instead of relying on the vendor specific implementations to send the
PME_Turn_Off message, introduce a generic way of sending the message using
the MSG TLP.
This is achieved by reserving a region for MSG TLP of size
'pci->region_align', at the end of the first IORESOURCE_MEM window of the
host bridge. And then sending the PME_Turn_Off message during system
suspend with the help of iATU.
The reason for reserving the MSG TLP region at the end of the
IORESOURCE_MEM is to avoid generating holes in between, because when the
region is allocated using allocate_resource(), memory will be allocated
from the start of the window. Later, if memory gets allocated for an
endpoint of size bigger than 'region_align', there will be a hole between
MSG TLP region and endpoint memory.
This generic implementation is optional for the glue drivers and can be
overridden by a custom 'pme_turn_off' callback.
Link: https://lore.kernel.org/linux-pci/[email protected]
Signed-off-by: Frank Li <[email protected]>
Signed-off-by: Krzysztof WilczyĆski <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Reviewed-by: Manivannan Sadhasivam <[email protected]>
Diffstat (limited to 'drivers/pci/controller/dwc/pci-layerscape-ep.c')
0 files changed, 0 insertions, 0 deletions
