Browse Source

qcacmn: Add WAR to confirm WBM IDLE ring LSB write

On Lahaina platform it is seen that WBM IDLE ring init is failing,
Write to WBM_IDLE link ring LSB write is failing.
Add temporary WAR to do back to back write of WBM IDLE link ring
LSB address config register.

Change-Id: I7f72abb7226e1d7beee127ebda88488172147f21
CRs-Fixed: 2647762
Manjunathappa Prakash 5 năm trước cách đây
mục cha
commit
3142406ced
1 tập tin đã thay đổi với 25 bổ sung0 xóa
  1. 25 0
      hal/wifi3.0/hal_generic_api.h

+ 25 - 0
hal/wifi3.0/hal_generic_api.h

@@ -1777,6 +1777,29 @@ void hal_get_hw_hptp_generic(struct hal_soc *hal_soc,
 	}
 }
 
+#if defined(WBM_IDLE_LSB_WRITE_CONFIRM_WAR)
+/**
+ * hal_wbm_idle_lsb_write_confirm() - Check and update WBM_IDLE_LINK ring LSB
+ * @srng: srng handle
+ *
+ * Return: None
+ */
+static void hal_wbm_idle_lsb_write_confirm(struct hal_srng *srng)
+{
+	if (srng->ring_id == HAL_SRNG_WBM_IDLE_LINK) {
+		while (SRNG_SRC_REG_READ(srng, BASE_LSB) !=
+		       ((unsigned int)srng->ring_base_paddr & 0xffffffff))
+				SRNG_SRC_REG_WRITE(srng, BASE_LSB,
+						   srng->ring_base_paddr &
+						   0xffffffff);
+	}
+}
+#else
+static void hal_wbm_idle_lsb_write_confirm(struct hal_srng *srng)
+{
+}
+#endif
+
 /**
  * hal_srng_src_hw_init - Private function to initialize SRNG
  * source ring HW
@@ -1804,6 +1827,8 @@ void hal_srng_src_hw_init_generic(struct hal_soc *hal,
 	}
 
 	SRNG_SRC_REG_WRITE(srng, BASE_LSB, srng->ring_base_paddr & 0xffffffff);
+	hal_wbm_idle_lsb_write_confirm(srng);
+
 	reg_val = SRNG_SM(SRNG_SRC_FLD(BASE_MSB, RING_BASE_ADDR_MSB),
 		((uint64_t)(srng->ring_base_paddr) >> 32)) |
 		SRNG_SM(SRNG_SRC_FLD(BASE_MSB, RING_SIZE),