[PATCH v6 08/10] PCI: dw-rockchip: Set broken L1SS resume flag
Shawn Lin
shawn.lin at rock-chips.com
Tue Sep 8 18:11:27 PDT 2026
在 2026/09/08 星期二 22:51, Sebastian Reichel 写道:
> Setup the broken_l1ss_resume flag, so that pci_suspend_retains_context()
> returns false on the Rockchip platform allowing PCIe peripheral device
> drivers to act upon.
>
> Signed-off-by: Sebastian Reichel <sebastian.reichel at collabora.com>
> ---
> drivers/pci/controller/dwc/pcie-dw-rockchip.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/drivers/pci/controller/dwc/pcie-dw-rockchip.c b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
> index 17530507e41b..47d9cab909bc 100644
> --- a/drivers/pci/controller/dwc/pcie-dw-rockchip.c
> +++ b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
> @@ -458,6 +458,21 @@ static int rockchip_pcie_host_init(struct dw_pcie_rp *pp)
> return 0;
> }
>
> +static void rockchip_pcie_host_post_init(struct dw_pcie_rp *pp)
> +{
> + /*
> + * During system suspend, the Rockchip RC driver effectively powers off
> + * the controller. If the link is in L1SS and the endpoint asserts
> + * CLKREQ# to exit L1SS, the time required to wake the system and
> + * restore the PHY/REFCLK may exceed the L1SS exit timing
> + * (L10_REFCLK_ON + T_COMMONMODE), resulting in Link Down (LDn) and a
> + * reset of the endpoint. Set this flag to indicate this limitation to
> + * client drivers so that they can avoid relying on device state being
> + * preserved during system suspend.
> + */
Yes, this is ture for Rockchip platforms that powering off the
controller as well as PHY is a default action during system suspend.
Reviewed-by: Shawn Lin <shawn.lin at rock-chips.com>
> + pp->bridge->broken_l1ss_resume = true;
> +}
> +
> static void rockchip_pcie_pme_turn_off(struct dw_pcie_rp *pp)
> {
> struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
> @@ -497,6 +512,7 @@ static void rockchip_pcie_pme_turn_off(struct dw_pcie_rp *pp)
>
> static const struct dw_pcie_host_ops rockchip_pcie_host_ops = {
> .init = rockchip_pcie_host_init,
> + .post_init = rockchip_pcie_host_post_init,
> .pme_turn_off = rockchip_pcie_pme_turn_off,
> };
>
>
More information about the linux-arm-kernel
mailing list