Эх сурвалжийг харах

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
Sandeep Singh 4 жил өмнө
parent
commit
0615ee270f

+ 5 - 2
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

+ 12 - 7
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

+ 4 - 0
core/pld/src/pld_common.c

@@ -32,8 +32,12 @@
 #include <net/cnss2.h>
 #endif
 #ifdef CONFIG_PLD_SNOC_ICNSS
+#ifdef CONFIG_PLD_SNOC_ICNSS2
+#include <soc/qcom/icnss2.h>
+#else
 #include <soc/qcom/icnss.h>
 #endif
+#endif
 #ifdef CONFIG_PLD_IPCI_ICNSS
 #include <soc/qcom/icnss2.h>
 #endif

+ 4 - 0
core/pld/src/pld_snoc.c

@@ -22,8 +22,12 @@
 #include <linux/slab.h>
 
 #ifdef CONFIG_PLD_SNOC_ICNSS
+#ifdef CONFIG_PLD_SNOC_ICNSS2
+#include <soc/qcom/icnss2.h>
+#else
 #include <soc/qcom/icnss.h>
 #endif
+#endif
 
 #include "pld_internal.h"
 #include "pld_snoc.h"

+ 4 - 0
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 <soc/qcom/icnss2.h>
+#else
 #include <soc/qcom/icnss.h>
 #endif
+#endif
 #include "pld_internal.h"
 
 #ifndef CONFIG_PLD_SNOC_ICNSS