From 67c55db07a8baea65681c4440cd1414db0c90c44 Mon Sep 17 00:00:00 2001 From: Paul Zhang Date: Wed, 9 Sep 2020 19:51:53 +0800 Subject: [PATCH] qcacld-3.0: Fix compiler issue about cnss_set_pcie_gen_speed Since some platform driver does not support for PCIE gen switch, Using macro PCIE_GEN_SWITCH to control whether function cnss_set_pcie_gen_speed is invoke or not. Change-Id: I478cd6426b005014e85c0b3c1c31963045d7322b CRs-Fixed: 2767110 --- Kbuild | 3 +++ configs/default_defconfig | 1 + core/pld/src/pld_pcie.h | 7 +++++++ 3 files changed, 11 insertions(+) diff --git a/Kbuild b/Kbuild index ebe30aa6a668..2c3af0807975 100644 --- a/Kbuild +++ b/Kbuild @@ -2894,6 +2894,9 @@ cppflags-$(CONFIG_HL_DP_SUPPORT) += -DQCA_COMPUTE_TX_DELAY_PER_TID cppflags-$(CONFIG_LL_DP_SUPPORT) += -DCONFIG_LL_DP_SUPPORT cppflags-$(CONFIG_LL_DP_SUPPORT) += -DWLAN_FULL_REORDER_OFFLOAD +# For PCIe GEN switch +cppflags-$(CONFIG_PCIE_GEN_SWITCH) += -DPCIE_GEN_SWITCH + # For OOB testing cppflags-$(CONFIG_WLAN_FEATURE_WOW_PULSE) += -DWLAN_FEATURE_WOW_PULSE diff --git a/configs/default_defconfig b/configs/default_defconfig index a2b46a70ff6f..d5bab23093bf 100644 --- a/configs/default_defconfig +++ b/configs/default_defconfig @@ -44,6 +44,7 @@ ifeq ($(CONFIG_CNSS_QCA6490), y) CONFIG_SCALE_INCLUDES := y CONFIG_HASTINGS_BT_WAR := y CONFIG_WDI3_IPA_OVER_GSI :=y + CONFIG_PCIE_GEN_SWITCH := y endif ifeq ($(CONFIG_CNSS_QCA6750), y) diff --git a/core/pld/src/pld_pcie.h b/core/pld/src/pld_pcie.h index f2508aa8e8b7..f03703f10a72 100644 --- a/core/pld/src/pld_pcie.h +++ b/core/pld/src/pld_pcie.h @@ -474,6 +474,7 @@ static inline void pld_pcie_allow_l1(struct device *dev) cnss_pci_allow_l1(dev); } +#ifdef PCIE_GEN_SWITCH /** * pld_pcie_set_gen_speed() - Wrapper for platform API to set PCIE gen speed * @dev: device @@ -487,6 +488,12 @@ static inline int pld_pcie_set_gen_speed(struct device *dev, u8 pcie_gen_speed) { return cnss_set_pcie_gen_speed(dev, pcie_gen_speed); } +#else +static inline int pld_pcie_set_gen_speed(struct device *dev, u8 pcie_gen_speed) +{ + return 0; +} +#endif static inline void pld_pcie_link_down(struct device *dev) {