Browse Source

qcacmn: Fix accessing unused CE channel ctrl register in WCN6450

Currently host is programming IDX_UPD_EN for all the CE
channels even though which are not used by host.

Fix this by programming CE ctrl register which are
used by host.


Change-Id: Ic0c133d87c688257ef2047bcb177228e25369aed
CRs-Fixed: 3575870
Karthik Kantamneni 1 year ago
parent
commit
bb6139453b
1 changed files with 7 additions and 2 deletions
  1. 7 2
      hif/src/ce/ce_main.c

+ 7 - 2
hif/src/ce/ce_main.c

@@ -4410,6 +4410,8 @@ static inline void hif_config_rri_on_ddr(struct hif_softc *scn)
 {
 	unsigned int i;
 	uint32_t high_paddr, low_paddr;
+	struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(scn);
+	struct CE_attr *attr;
 
 	if (hif_alloc_rri_on_ddr(scn) != QDF_STATUS_SUCCESS)
 		return;
@@ -4422,8 +4424,11 @@ static inline void hif_config_rri_on_ddr(struct hif_softc *scn)
 	WRITE_CE_DDR_ADDRESS_FOR_RRI_LOW(scn, low_paddr);
 	WRITE_CE_DDR_ADDRESS_FOR_RRI_HIGH(scn, high_paddr);
 
-	for (i = 0; i < CE_COUNT; i++)
-		CE_IDX_UPD_EN_SET(scn, CE_BASE_ADDRESS(i));
+	for (i = 0; i < CE_COUNT; i++) {
+		attr = &hif_state->host_ce_config[i];
+		if (attr->src_nentries || attr->dest_nentries)
+			CE_IDX_UPD_EN_SET(scn, CE_BASE_ADDRESS(i));
+	}
 }
 #else
 static inline void hif_config_rri_on_ddr(struct hif_softc *scn)