mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-23 13:09:04 -04:00
qcacmn: Pointerize hif_dump_registers
Allow different busses to have different register sets to dump in case of a crash. Change-Id: I2b0665f276594dfb29ca34fe3f363c2f414cd2e7 CRs-Fixed: 986480
This commit is contained in:
parent
162164c8cd
commit
3c017e7bcf
8 changed files with 19 additions and 21 deletions
|
|
@ -214,3 +214,9 @@ void hif_irq_disable(struct hif_softc *hif_sc, int irq_id)
|
|||
{
|
||||
hif_sc->bus_ops.hif_irq_disable(hif_sc, irq_id);
|
||||
}
|
||||
|
||||
int hif_dump_registers(struct hif_opaque_softc *hif_hdl)
|
||||
{
|
||||
struct hif_softc *hif_sc = HIF_GET_SOFTC(hif_hdl);
|
||||
return hif_sc->bus_ops.hif_dump_registers(hif_sc);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ struct hif_bus_ops {
|
|||
int (*hif_bus_configure)(struct hif_softc *hif_sc);
|
||||
void (*hif_irq_disable)(struct hif_softc *hif_sc, int ce_id);
|
||||
void (*hif_irq_enable)(struct hif_softc *hif_sc, int ce_id);
|
||||
int (*hif_dump_registers)(struct hif_softc *hif_sc);
|
||||
};
|
||||
|
||||
#ifdef HIF_SNOC
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ QDF_STATUS hif_initialize_pci_ops(struct hif_softc *hif_sc)
|
|||
bus_ops->hif_bus_configure = &hif_pci_bus_configure;
|
||||
bus_ops->hif_irq_disable = &hif_pci_irq_disable;
|
||||
bus_ops->hif_irq_enable = &hif_pci_irq_enable;
|
||||
bus_ops->hif_dump_registers = &hif_pci_dump_registers;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ QDF_STATUS hif_initialize_snoc_ops(struct hif_bus_ops *bus_ops)
|
|||
bus_ops->hif_bus_configure = &hif_snoc_bus_configure;
|
||||
bus_ops->hif_irq_disable = &hif_snoc_irq_disable;
|
||||
bus_ops->hif_irq_enable = &hif_snoc_irq_enable;
|
||||
bus_ops->hif_dump_registers = &hif_snoc_dump_registers;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,3 +45,4 @@ void hif_pci_disable_bus(struct hif_softc *scn);
|
|||
int hif_pci_bus_configure(struct hif_softc *scn);
|
||||
void hif_pci_irq_disable(struct hif_softc *scn, int ce_id);
|
||||
void hif_pci_irq_enable(struct hif_softc *scn, int ce_id);
|
||||
int hif_pci_dump_registers(struct hif_softc *scn);
|
||||
|
|
|
|||
|
|
@ -40,3 +40,4 @@ void hif_snoc_disable_bus(struct hif_softc *scn);
|
|||
int hif_snoc_bus_configure(struct hif_softc *scn);
|
||||
void hif_snoc_irq_disable(struct hif_softc *scn, int ce_id);
|
||||
void hif_snoc_irq_enable(struct hif_softc *scn, int ce_id);
|
||||
int hif_snoc_dump_registers(struct hif_softc *scn);
|
||||
|
|
|
|||
|
|
@ -639,14 +639,15 @@ int hif_check_soc_status(struct hif_opaque_softc *hif_ctx)
|
|||
}
|
||||
|
||||
/**
|
||||
* hif_dump_pci_registers(): dump PCI debug registers
|
||||
* __hif_pci_dump_registers(): dump other PCI debug registers
|
||||
* @scn: struct hif_softc
|
||||
*
|
||||
* This function dumps pci debug registers
|
||||
* This function dumps pci debug registers. The parrent function
|
||||
* dumps the copy engine registers before calling this function.
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static void hif_dump_pci_registers(struct hif_softc *scn)
|
||||
static void __hif_pci_dump_registers(struct hif_softc *scn)
|
||||
{
|
||||
struct hif_pci_softc *sc = HIF_GET_PCI_SOFTC(scn);
|
||||
void __iomem *mem = sc->mem;
|
||||
|
|
@ -780,7 +781,7 @@ static void hif_dump_pci_registers(struct hif_softc *scn)
|
|||
*
|
||||
* Return: 0 for success or error code
|
||||
*/
|
||||
int hif_dump_registers(struct hif_opaque_softc *hif_ctx)
|
||||
int hif_pci_dump_registers(struct hif_softc *hif_ctx)
|
||||
{
|
||||
int status;
|
||||
struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx);
|
||||
|
|
@ -790,7 +791,8 @@ int hif_dump_registers(struct hif_opaque_softc *hif_ctx)
|
|||
if (status)
|
||||
HIF_ERROR("%s: Dump CE Registers Failed", __func__);
|
||||
|
||||
hif_dump_pci_registers(scn);
|
||||
/* dump non copy engine pci registers */
|
||||
__hif_pci_dump_registers(scn);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,19 +55,6 @@ void hif_snoc_disable_isr(struct hif_softc *scn)
|
|||
qdf_atomic_set(&scn->active_tasklet_cnt, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_dump_snoc_registers(): dump CE debug registers
|
||||
* @scn: struct hif_softc
|
||||
*
|
||||
* This function dumps SNOC debug registers
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static void hif_dump_snoc_registers(struct hif_softc *scn)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_dump_registers(): dump bus debug registers
|
||||
* @scn: struct hif_opaque_softc
|
||||
|
|
@ -76,7 +63,7 @@ static void hif_dump_snoc_registers(struct hif_softc *scn)
|
|||
*
|
||||
* Return: 0 for success or error code
|
||||
*/
|
||||
int hif_dump_registers(struct hif_opaque_softc *hif_ctx)
|
||||
int hif_snoc_dump_registers(struct hif_softc *hif_ctx)
|
||||
{
|
||||
int status;
|
||||
struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx);
|
||||
|
|
@ -85,8 +72,6 @@ int hif_dump_registers(struct hif_opaque_softc *hif_ctx)
|
|||
if (status)
|
||||
HIF_ERROR("%s: Dump CE Registers Failed", __func__);
|
||||
|
||||
hif_dump_snoc_registers(scn);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue