From 7db2e7aacd3532ae6a1a7f40b51ea379681f7c25 Mon Sep 17 00:00:00 2001 From: Hemant Kumar Date: Tue, 25 Aug 2020 19:20:57 -0700 Subject: [PATCH] pci: msm: Add support to send vote against DRV PC Some endpoints require to prevent DRV processor power collapse in order to meet the latency requirement to access DDR over PCIe link. Send the vote info as part of DRV enable command over rpmsg. Change-Id: Iac3e6a0cd4978be877ae305aad31ed02570e4f3c Signed-off-by: Hemant Kumar --- drivers/pci/controller/pci-msm.c | 2 ++ include/linux/msm_pcie.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/pci/controller/pci-msm.c b/drivers/pci/controller/pci-msm.c index 827db7667fee..15dfc0f9de6b 100644 --- a/drivers/pci/controller/pci-msm.c +++ b/drivers/pci/controller/pci-msm.c @@ -6775,6 +6775,8 @@ static int msm_pcie_drv_suspend(struct msm_pcie_dev_t *pcie_dev, /* disable global irq - no more linkdown/aer detection */ disable_irq(pcie_dev->irq[MSM_PCIE_INT_GLOBAL_INT].num); + drv_info->drv_enable.pkt.dword[2] = options & MSM_PCIE_CONFIG_NO_DRV_PC; + ret = msm_pcie_drv_send_rpmsg(pcie_dev, &drv_info->drv_enable); if (ret) { ret = -EBUSY; diff --git a/include/linux/msm_pcie.h b/include/linux/msm_pcie.h index e92000fba656..a90725e93b0f 100644 --- a/include/linux/msm_pcie.h +++ b/include/linux/msm_pcie.h @@ -13,6 +13,7 @@ enum msm_pcie_config { MSM_PCIE_CONFIG_LINKDOWN = 0x2, MSM_PCIE_CONFIG_NO_RECOVERY = 0x4, MSM_PCIE_CONFIG_NO_L1SS_TO = 0x8, + MSM_PCIE_CONFIG_NO_DRV_PC = 0x10, }; enum msm_pcie_pm_opt {