Kaynağa Gözat

qcacld-3.0: Enable all 12 Copy Engines

Facilitates faster data transfers. This provides a basis
to start using the other 4 CEs for additional services.
Only adding structure elements to enable these CEs not
really using them yet.

Change-Id: I4be07413de409195ccc717765c75806a1470941e
CRs-Fixed: 938752
Sanjay Devnani 9 yıl önce
ebeveyn
işleme
9ce15778e1

+ 4 - 0
core/hif/inc/hif.h

@@ -85,7 +85,11 @@ typedef void __iomem *A_target_id_t;
 #define TARGET_TYPE_ADRASTEA     16
 
 struct CE_state;
+#ifdef QCA_WIFI_3_0_ADRASTEA
+#define CE_COUNT_MAX 12
+#else
 #define CE_COUNT_MAX 8
+#endif
 
 /* These numbers are selected so that the product is close to current
    higher limit of packets HIF services at one shot (1000) */

+ 1 - 1
core/hif/src/adrastea_reg_def.h

@@ -2159,7 +2159,7 @@ struct hostdef_s adrastea_hostdef = {
 	.d_SOC_PCIE_BASE_ADDRESS = SOC_PCIE_BASE_ADDRESS,
 	.d_MSI_MAGIC_ADR_ADDRESS = MSI_MAGIC_ADR_ADDRESS,
 	.d_MSI_MAGIC_ADDRESS = MSI_MAGIC_ADDRESS,
-	.d_HOST_CE_COUNT = 8,
+	.d_HOST_CE_COUNT = ADRASTEA_CE_COUNT,
 	.d_ENABLE_MSI = 0,
 	.d_MUX_ID_MASK = 0xf000,
 	.d_TRANSACTION_ID_MASK = 0x0fff,

+ 11 - 1
core/hif/src/ce/ce_assignment.h

@@ -92,6 +92,12 @@ static struct CE_attr host_ce_config_wlan[] = {
 	/* ce_diag, the Diagnostic Window */
 	{ /* CE7 */ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,
 		2, DIAG_TRANSFER_LIMIT, 2, NULL,},
+	/* Target to uMC */
+	{ /* CE8 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
+	/*The following CEs are not being used yet */
+	{ /* CE9 */ CE_ATTR_FLAGS, 0, 0,  0, 0, NULL,},
+	{ /* CE10 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
+	{ /* CE11 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
 };
 
 static struct CE_pipe_config target_ce_config_wlan[] = {
@@ -116,7 +122,11 @@ static struct CE_pipe_config target_ce_config_wlan[] = {
 	{ /* CE7 */ 7, PIPEDIR_INOUT_H2H, 0, 0,
 		(CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
 	/* CE8 used only by IPA */
-	{ /* CE8 */ 8, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,}
+	{ /* CE8 */ 8, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,},
+	/*The following CEs are not being used yet*/
+	{ /* CE9 */ 9, PIPEDIR_IN,  0, 0, CE_ATTR_FLAGS, 0,},
+	{ /* CE10 */ 9, PIPEDIR_IN,  0, 0, CE_ATTR_FLAGS, 0,},
+	{ /* CE11 */ 9, PIPEDIR_IN,  0, 0, CE_ATTR_FLAGS, 0,},
 };
 
 static struct CE_attr host_ce_config_wlan_epping_poll[] = {

+ 8 - 0
core/hif/src/ce/ce_service.c

@@ -1509,6 +1509,10 @@ ce_send_cb_register(struct CE_handle *copyeng,
 {
 	struct CE_state *CE_state = (struct CE_state *)copyeng;
 
+	if (CE_state == NULL) {
+		pr_err("%s: Error CE state = NULL\n", __func__);
+		return;
+	}
 	cdf_spin_lock(&CE_state->scn->target_lock);
 	CE_state->send_cb = fn_ptr;
 	CE_state->send_context = ce_send_context;
@@ -1523,6 +1527,10 @@ ce_recv_cb_register(struct CE_handle *copyeng,
 {
 	struct CE_state *CE_state = (struct CE_state *)copyeng;
 
+	if (CE_state == NULL) {
+		pr_err("%s: ERROR CE state = NULL\n", __func__);
+		return;
+	}
 	cdf_spin_lock(&CE_state->scn->target_lock);
 	CE_state->recv_cb = fn_ptr;
 	CE_state->recv_context = CE_recv_context;