From 9c0e4800ea1ac6198ad5cbacdc94c0ccfafc88df Mon Sep 17 00:00:00 2001 From: Yue Ma Date: Tue, 11 Sep 2018 15:34:06 -0700 Subject: [PATCH] qcacld-3.0: Add PLD support to check if FW is down for PCIe bus Support to check if FW is down or not for PCIe bus in PLD layer. Change-Id: Ic09607016c430a1c4ec6c30f9b29b1ab52b4c885 CRs-fixed: 2268026 --- core/pld/src/pld_common.c | 2 ++ core/pld/src/pld_pcie.h | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/core/pld/src/pld_common.c b/core/pld/src/pld_common.c index ff6b39966155..e4b4b60efda9 100644 --- a/core/pld/src/pld_common.c +++ b/core/pld/src/pld_common.c @@ -1494,6 +1494,8 @@ int pld_is_fw_down(struct device *dev) ret = pld_snoc_is_fw_down(dev); break; case PLD_BUS_TYPE_PCIE: + ret = pld_pcie_is_fw_down(dev); + break; case PLD_BUS_TYPE_SDIO: case PLD_BUS_TYPE_USB: break; diff --git a/core/pld/src/pld_pcie.h b/core/pld/src/pld_pcie.h index 14f3f1ec4058..d6263d55a1ca 100644 --- a/core/pld/src/pld_pcie.h +++ b/core/pld/src/pld_pcie.h @@ -140,6 +140,11 @@ static inline void pld_pcie_link_down(struct device *dev) { } +static inline int pld_pcie_is_fw_down(struct device *dev) +{ + return 0; +} + static inline int pld_pcie_athdiag_read(struct device *dev, uint32_t offset, uint32_t memtype, uint32_t datalen, uint8_t *output) @@ -270,6 +275,11 @@ static inline void pld_pcie_link_down(struct device *dev) cnss_pci_link_down(dev); } +static inline int pld_pcie_is_fw_down(struct device *dev) +{ + return cnss_pci_is_device_down(dev); +} + static inline int pld_pcie_athdiag_read(struct device *dev, uint32_t offset, uint32_t memtype, uint32_t datalen, uint8_t *output)