Pārlūkot izejas kodu

cnss2: Dump qdss registers only when etr dump enabled

Skip dumping qdss registers if etr dump is not enabled, or
will hit NOC error since these qdss registers are not powered on.
Move dump process after device enter into RDDM mode, or registers
might be invalid.

Change-Id: Ib5e5a8d8beb2e1f76266ce0f25d4abe6e73e7506
CRs-fixed: 3226702
Kai Liu 2 gadi atpakaļ
vecāks
revīzija
07e71590f2
1 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  1. 2 1
      cnss2/pci.c

+ 2 - 1
cnss2/pci.c

@@ -4900,7 +4900,6 @@ void cnss_pci_collect_dump_info(struct cnss_pci_data *pci_priv, bool in_panic)
 	cnss_pci_soc_scratch_reg_dump(pci_priv);
 	cnss_pci_dump_misc_reg(pci_priv);
 	cnss_pci_dump_shadow_reg(pci_priv);
-	cnss_pci_dump_qdss_reg(pci_priv);
 
 	ret = mhi_download_rddm_image(pci_priv->mhi_ctrl, in_panic);
 	if (ret) {
@@ -4916,6 +4915,8 @@ void cnss_pci_collect_dump_info(struct cnss_pci_data *pci_priv, bool in_panic)
 	rddm_image = pci_priv->mhi_ctrl->rddm_image;
 	dump_data->nentries = 0;
 
+	if (plat_priv->qdss_mem_seg_len)
+		cnss_pci_dump_qdss_reg(pci_priv);
 	cnss_mhi_dump_sfr(pci_priv);
 
 	if (!dump_seg) {