From 0615ee270f3e4b4e362c55fd11b894a0b07b9e87 Mon Sep 17 00:00:00 2001 From: Sandeep Singh Date: Wed, 8 Jul 2020 17:40:27 +0530 Subject: [PATCH] qcacld-3.0: Enable both SNOC and IPCI PLD layer for ICNSS2 ICNSS2 platform driver is used for moselle and adrastea which uses IPCI and SNOC PLD layer, respectively. Add support to enable both for ICNSS2 based to target flag. Change-Id: I06fbacade99b09c9ea7347aa28e10968eaeedaa8 --- Kbuild | 7 +++++-- configs/default_defconfig | 19 ++++++++++++------- core/pld/src/pld_common.c | 4 ++++ core/pld/src/pld_snoc.c | 4 ++++ core/pld/src/pld_snoc.h | 4 ++++ 5 files changed, 29 insertions(+), 9 deletions(-) diff --git a/Kbuild b/Kbuild index 92b997052f8c..c549fe327319 100644 --- a/Kbuild +++ b/Kbuild @@ -2185,9 +2185,9 @@ PLD_OBJS += $(PLD_SRC_DIR)/pld_pcie.o endif ifeq ($(CONFIG_SNOC_FW_SIM),y) PLD_OBJS += $(PLD_SRC_DIR)/pld_snoc_fw_sim.o -else ifeq (y,$(findstring y, $(CONFIG_ICNSS) $(CONFIG_ICNSS_MODULE))) +else ifeq (y,$(findstring y, $(CONFIG_ICNSS) $(CONFIG_PLD_SNOC_ICNSS_FLAG))) PLD_OBJS += $(PLD_SRC_DIR)/pld_snoc.o -else ifeq (y,$(findstring y, $(CONFIG_ICNSS2) $(CONFIG_ICNSS2_MODULE))) +else ifeq (y,$(findstring y, $(CONFIG_PLD_IPCI_ICNSS_FLAG))) PLD_OBJS += $(PLD_SRC_DIR)/pld_ipci.o endif @@ -2589,6 +2589,9 @@ cppflags-y += -DCONFIG_PLD_SNOC_ICNSS endif endif +cppflags-$(CONFIG_PLD_SNOC_ICNSS_FLAG) += -DCONFIG_PLD_SNOC_ICNSS +cppflags-$(CONFIG_ICNSS2_HELIUM) += -DCONFIG_PLD_SNOC_ICNSS2 + cppflags-$(CONFIG_WIFI_3_0_ADRASTEA) += -DQCA_WIFI_3_0_ADRASTEA cppflags-$(CONFIG_WIFI_3_0_ADRASTEA) += -DQCA_WIFI_3_0 cppflags-$(CONFIG_ADRASTEA_SHADOW_REGISTERS) += -DADRASTEA_SHADOW_REGISTERS diff --git a/configs/default_defconfig b/configs/default_defconfig index 6da6d5103233..2c0dd0f159ed 100644 --- a/configs/default_defconfig +++ b/configs/default_defconfig @@ -93,10 +93,19 @@ endif ifeq (y,$(findstring y,$(CONFIG_ICNSS) $(CONFIG_ICNSS_MODULE))) CONFIG_ROME_IF = snoc CONFIG_QCA_WIFI_SDIO := n + CONFIG_PLD_SNOC_ICNSS_FLAG := y endif ifeq (y,$(findstring y,$(CONFIG_ICNSS2) $(CONFIG_ICNSS2_MODULE))) +ifeq ($(CONFIG_CNSS_QCA6750), y) CONFIG_ROME_IF = ipci + CONFIG_PLD_IPCI_ICNSS_FLAG := y +else + CONFIG_ROME_IF = snoc + CONFIG_QCA_WIFI_SDIO := n + CONFIG_ICNSS2_HELIUM := y + CONFIG_PLD_SNOC_ICNSS_FLAG := y +endif endif ifdef CONFIG_IPCIE_FW_SIM @@ -115,7 +124,7 @@ endif # Make WLAN as open-source driver by default WLAN_OPEN_SOURCE := y -ifeq (y,$(findstring y,$(CONFIG_ICNSS) $(CONFIG_ICNSS_MODULE))) +ifeq (y,$(findstring y,$(CONFIG_ICNSS) $(CONFIG_ICNSS_MODULE) $(CONFIG_ICNSS2_HELIUM))) CONFIG_HELIUMPLUS := y CONFIG_64BIT_PADDR := y CONFIG_FEATURE_TSO := y @@ -419,7 +428,7 @@ endif #Whether have QMI support CONFIG_QMI_SUPPORT := y -ifeq (y,$(findstring y,$(CONFIG_ICNSS) $(CONFIG_ICNSS_MODULE))) +ifeq (y,$(findstring y,$(CONFIG_ICNSS) $(CONFIG_ICNSS_MODULE) $(CONFIG_ICNSS2_HELIUM))) CONFIG_WIFI_3_0_ADRASTEA := y CONFIG_ADRASTEA_RRI_ON_DDR := y # Enable athdiag procfs debug support for adrastea @@ -938,7 +947,7 @@ CONFIG_WLAN_ALLOCATE_GLOBAL_BUFFERS_DYNAMICALLY := n CONFIG_WLAN_FEATURE_TWT := y CONFIG_FW_THERMAL_THROTTLE := y -ifeq (y,$(findstring y,$(CONFIG_LITHIUM) $(CONFIG_ICNSS) $(CONFIG_ICNSS_MODULE))) +ifeq (y,$(findstring y,$(CONFIG_LITHIUM) $(CONFIG_ICNSS) $(CONFIG_ICNSS_MODULE) $(CONFIG_ICNSS2_HELIUM))) CONFIG_WLAN_FEATURE_BMI := n else CONFIG_WLAN_FEATURE_BMI := y @@ -1053,10 +1062,6 @@ CONFIG_PLD_PCIE_CNSS_FLAG := y endif endif -ifeq (y,$(findstring y,$(CONFIG_ICNSS2) $(CONFIG_ICNSS2_MODULE))) -CONFIG_PLD_IPCI_ICNSS_FLAG := y -endif - ifeq (y,$(findstring y,$(CONFIG_CNSS2) $(CONFIG_CNSS2_MODULE))) ifeq ($(CONFIG_HIF_PCI), y) CONFIG_PLD_PCIE_CNSS_FLAG := y diff --git a/core/pld/src/pld_common.c b/core/pld/src/pld_common.c index 0540755079bb..b91f1b791c16 100644 --- a/core/pld/src/pld_common.c +++ b/core/pld/src/pld_common.c @@ -32,8 +32,12 @@ #include #endif #ifdef CONFIG_PLD_SNOC_ICNSS +#ifdef CONFIG_PLD_SNOC_ICNSS2 +#include +#else #include #endif +#endif #ifdef CONFIG_PLD_IPCI_ICNSS #include #endif diff --git a/core/pld/src/pld_snoc.c b/core/pld/src/pld_snoc.c index 0e7a431a7806..f6114240bdb6 100644 --- a/core/pld/src/pld_snoc.c +++ b/core/pld/src/pld_snoc.c @@ -22,8 +22,12 @@ #include #ifdef CONFIG_PLD_SNOC_ICNSS +#ifdef CONFIG_PLD_SNOC_ICNSS2 +#include +#else #include #endif +#endif #include "pld_internal.h" #include "pld_snoc.h" diff --git a/core/pld/src/pld_snoc.h b/core/pld/src/pld_snoc.h index b1c9806e0424..7c938d518167 100644 --- a/core/pld/src/pld_snoc.h +++ b/core/pld/src/pld_snoc.h @@ -20,8 +20,12 @@ #define __PLD_SNOC_H__ #ifdef CONFIG_PLD_SNOC_ICNSS +#ifdef CONFIG_PLD_SNOC_ICNSS2 +#include +#else #include #endif +#endif #include "pld_internal.h" #ifndef CONFIG_PLD_SNOC_ICNSS