qcacmn: do a dummy read to flush pending writes

Currently before suspending the device, we are draining
out the TX/RX SRNGs. The HP/TP updates which are done as
part of this will be posted writes(there won't be any link
levelccompletions for write transactions), there are chances
that we might end up updating HP/TP after the device enters
low power mode leading to system crashes.

In order to avoid this scenario, do a dummy read before
device is suspended; this will ensure all pendings writes are
flushed before read returns.

CRs-Fixed: 2919459

Change-Id: I5ab77f91fe14c506444bdea1587acfb34224fc69
このコミットが含まれているのは:
Manikanta Pubbisetty
2021-04-12 18:05:39 +05:30
committed by snandini
コミット 5a19bd0c38

ファイルの表示

@@ -11448,6 +11448,7 @@ static void dp_drain_txrx(struct cdp_soc_t *soc_handle)
struct dp_soc *soc = (struct dp_soc *)soc_handle;
uint32_t cur_tx_limit, cur_rx_limit;
uint32_t budget = 0xffff;
uint32_t val;
int i;
cur_tx_limit = soc->wlan_cfg_ctx->tx_comp_loop_pkt_limit;
@@ -11465,6 +11466,12 @@ static void dp_drain_txrx(struct cdp_soc_t *soc_handle)
dp_service_srngs(&soc->intr_ctx[i], budget);
dp_update_soft_irq_limits(soc, cur_tx_limit, cur_rx_limit);
/* Do a dummy read at offset 0; this will ensure all
* pendings writes(HP/TP) are flushed before read returns.
*/
val = HAL_REG_READ((struct hal_soc *)soc->hal_soc, 0);
dp_debug("Register value at offset 0: %u\n", val);
}
#endif