]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: mediatek-gen3: Add system PM support
authorJianjun Wang <jianjun.wang@mediatek.com>
Tue, 20 Apr 2021 06:17:22 +0000 (14:17 +0800)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Thu, 29 Apr 2021 16:34:22 +0000 (17:34 +0100)
commitc4f9cb5abffc3cf6786f4c9c5be4cba88ce1fcb4
tree5782f12bef59883aa8f0296eebc7300cd1c55293
parentd88974dfa144aa2d5424c01be520a013e1cf6f4d
PCI: mediatek-gen3: Add system PM support

Add suspend_noirq and resume_noirq callback functions to implement PM
system suspend and resume hooks for the MediaTek Gen3 PCIe controller.

When the system suspends, trigger the PCIe link to enter the L2 state
and pull down the PERST# pin, gating the clocks of the MAC layer, and
then power-off the physical layer to provide power-saving.

When the system resumes, the PCIe link should be re-established and the
related control register values should be restored.

Link: https://lore.kernel.org/r/20210420061723.989-7-jianjun.wang@mediatek.com
Signed-off-by: Jianjun Wang <jianjun.wang@mediatek.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Ryder Lee <ryder.lee@mediatek.com>
drivers/pci/controller/pcie-mediatek-gen3.c