[PATCH] PCI: dw-rockchip: Add system PM support
Shawn Lin
shawn.lin at rock-chips.com
Thu Apr 10 19:26:56 PDT 2025
在 2025/04/11 星期五 10:02, Damien Le Moal 写道:
> On 4/10/25 15:50, Shawn Lin wrote:
>> +static int rockchip_pcie_suspend(struct device *dev)
>> +{
>> + struct rockchip_pcie *rockchip = dev_get_drvdata(dev);
>> + struct dw_pcie *pci = &rockchip->pci;
>> + int ret;
>> +
>> + rockchip->intx = rockchip_pcie_readl_apb(rockchip, PCIE_CLIENT_INTR_MASK_LEGACY);
>> +
>> + ret = dw_pcie_suspend_noirq(pci);
>> + if (ret) {
>> + dev_err(dev, "failed to suspend\n");
>> + return ret;
>> + }
>> +
>> + rockchip_pcie_phy_deinit(rockchip);
>> + clk_bulk_disable_unprepare(rockchip->clk_cnt, rockchip->clks);
>> + reset_control_assert(rockchip->rst);
>> + if (rockchip->vpcie3v3)
>> + regulator_disable(rockchip->vpcie3v3);
>> + gpiod_set_value_cansleep(rockchip->rst_gpio, 0);
>> +
>> + return 0;
>> +}
>
> This function needs a __maybe_unused in its declaration, otherwise, you get a
> compilation warning when PM is not enabled.
>
> static int __maybe_unused rockchip_pcie_suspend(struct device *dev)
>
>
Emm.. I don't see any host drivers with system PM support under
drivers/pci/controller/ adds these :)
#grep suspend drivers/pci/controller/ -rn | grep __maybe_unused | wc -l
0
Anyway, will fix it.
>> +static int rockchip_pcie_resume(struct device *dev)
>
> Same here too.
>
>
More information about the Linux-rockchip
mailing list