PCI: imx: Add PME_Turn_Off support
authorLeonard Crestez <leonard.crestez@nxp.com>
Thu, 19 Jul 2018 14:02:10 +0000 (17:02 +0300)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Fri, 5 Oct 2018 11:00:35 +0000 (12:00 +0100)
commitf4e833ba2a955bc15c1ccaa5b0b3c2a0d7989bca
tree6837d8a73f76dfd371476a380ea14f423e91829f
parent3aedf7e135b55cb74a62c0be79a86384f76e5724
PCI: imx: Add PME_Turn_Off support

When the root complex suspends it must send a PME_Turn_Off TLP.
Implement this by asserting the "turnoff" reset.

On imx7d this functionality is part of the System Reset Controller (SRC)
and is exposed through the linux reset-controller subsystem.

On imx6 equivalent bits are in the IOMUXC pinmux controller General
Purpose Register (GPR) area which the imx6-pcie driver accesses
directly.

This is only for imx7d right now but it's deliberately implemented as an
optional reset, ignoring the chip variant:
* Older dtbs won't have this reset so it will be ignored.
* Future chips might also expose this as a reset controller.

For example imx8m (not yet supported) has the exact same
PCIE_CTRL_APPS_TURNOFF bit in the same location.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
[lorenzo.pieralisi@arm.com: updated commit log]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
drivers/pci/controller/dwc/pci-imx6.c