qcacmn: Enhance ce register dump and add hif_get_irq_num
Modify the CE register debug dump routine to print the read, write indexes on the console. Add new function to return vector used for specific radio. WIN uses this routine to retrieve the irq and assign the same to radio netdev irq field. Assign the radio netdev with the right irq number which helps qrfs to steer to traffic towards a specific core. Change-Id: I94bdcc323afbee53946ea9e50a773ffe35224ae6 Acked-by: Balamurugan Mahalingam <bmahalin@codeaurora.org> CRs-Fixed: 1066208
This commit is contained in:

committato da
qcabuildsw

parent
26f6f1ebae
commit
772377c7df
@@ -680,6 +680,7 @@ void hif_process_runtime_suspend_failure(struct hif_opaque_softc *);
|
||||
void hif_process_runtime_resume_success(struct hif_opaque_softc *);
|
||||
#endif
|
||||
|
||||
int hif_get_irq_num(struct hif_opaque_softc *scn, int *irq, uint32_t size);
|
||||
int hif_dump_registers(struct hif_opaque_softc *scn);
|
||||
int ol_copy_ramdump(struct hif_opaque_softc *scn);
|
||||
void hif_crash_shutdown(struct hif_opaque_softc *hif_ctx);
|
||||
|
@@ -2805,14 +2805,26 @@ int hif_dump_ce_registers(struct hif_softc *scn)
|
||||
HIF_ERROR("Dumping CE register failed!");
|
||||
return -EACCES;
|
||||
}
|
||||
HIF_ERROR("CE%d Registers:", i);
|
||||
HIF_ERROR("CE%d=>\n", i);
|
||||
qdf_trace_hex_dump(QDF_MODULE_ID_HIF, QDF_TRACE_LEVEL_DEBUG,
|
||||
(uint8_t *) &ce_reg_values[0],
|
||||
ce_reg_word_size * sizeof(uint32_t));
|
||||
qdf_print("ADDR:[0x%08X], SR_WR_INDEX:%d\n", (ce_reg_address
|
||||
+ SR_WR_INDEX_ADDRESS),
|
||||
ce_reg_values[SR_WR_INDEX_ADDRESS/4]);
|
||||
qdf_print("ADDR:[0x%08X], CURRENT_SRRI:%d\n", (ce_reg_address
|
||||
+ CURRENT_SRRI_ADDRESS),
|
||||
ce_reg_values[CURRENT_SRRI_ADDRESS/4]);
|
||||
qdf_print("ADDR:[0x%08X], DST_WR_INDEX:%d\n", (ce_reg_address
|
||||
+ DST_WR_INDEX_ADDRESS),
|
||||
ce_reg_values[DST_WR_INDEX_ADDRESS/4]);
|
||||
qdf_print("ADDR:[0x%08X], CURRENT_DRRI:%d\n", (ce_reg_address
|
||||
+ CURRENT_DRRI_ADDRESS),
|
||||
ce_reg_values[CURRENT_DRRI_ADDRESS/4]);
|
||||
qdf_print("---\n");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef QCA_NSS_WIFI_OFFLOAD_SUPPORT
|
||||
struct hif_pipe_addl_info *hif_get_addl_pipe_info(struct hif_opaque_softc *osc,
|
||||
struct hif_pipe_addl_info *hif_info, uint32_t pipe)
|
||||
|
@@ -304,6 +304,33 @@ bool hif_pci_targ_is_present(struct hif_softc *scn, void *__iomem *mem)
|
||||
return 1; /* FIX THIS */
|
||||
}
|
||||
|
||||
int hif_get_irq_num(struct hif_opaque_softc *scn, int *irq, uint32_t size)
|
||||
{
|
||||
struct hif_pci_softc *sc = HIF_GET_PCI_SOFTC(scn);
|
||||
int i = 0;
|
||||
|
||||
if (!irq || !size) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!sc->num_msi_intrs || sc->num_msi_intrs == 1) {
|
||||
irq[0] = sc->irq;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (sc->num_msi_intrs > size) {
|
||||
qdf_print("Not enough space in irq buffer to return irqs\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
for (i = 0; i < sc->num_msi_intrs; i++) {
|
||||
irq[i] = sc->irq + i + MSI_ASSIGN_CE_INITIAL;
|
||||
}
|
||||
|
||||
return sc->num_msi_intrs;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* hif_pci_cancel_deferred_target_sleep() - cancels the defered target sleep
|
||||
* @scn: hif_softc
|
||||
|
Fai riferimento in un nuovo problema
Block a user