Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 127699a2 authored by Sameer Thalappil's avatar Sameer Thalappil
Browse files

wcnss: Enable/disable WCNSS register dump on WCNSS bite



When Apps recieves a WDOG bite from WCNSS, collecting a register
dump of WCNSS is helpful to root cause the failure. WCNSS may not
be properly clocked in some WCNSS bite cases, and that may
cause unclocked register access failures.  So add a feature flag
so that customers can disable this register dump on production
builds.

Change-Id: Ifc9c577ac3a342634e01b3da9c12973c5c1a7713
CRs-Fixed: 556962
Signed-off-by: default avatarSameer Thalappil <sameert@codeaurora.org>
parent 01364e16
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -338,7 +338,7 @@ static irqreturn_t wcnss_wdog_bite_irq_hdlr(int irq, void *dev_id)
		pr_err("Ignoring wcnss bite irq, restart in progress\n");
		return IRQ_HANDLED;
	}
	wcnss_pronto_log_debug_regs();
	wcnss_log_debug_regs_on_bite();

	drv->restart_inprogress = true;
	restart_wcnss(drv);
+10 −0
Original line number Diff line number Diff line
@@ -310,6 +310,16 @@ config WCNSS_MEM_PRE_ALLOC
	---help---
	  Pre-allocate memory for the WLAN driver module

config WCNSS_REGISTER_DUMP_ON_BITE
	bool "Enable/disable WCNSS register dump when there is a WCNSS bite"
	depends on WCNSS_CORE_PRONTO
	help
	 When Apps recieves a WDOG bite from WCNSS, collecting a register dump
	 of WCNSS is helpful to root cause the failure. WCNSS may not be
	 properly clocked in some WCNSS bite cases, and that may cause unclocked
	 register access failures. So this feature is to enable/disable the
	 register dump on WCNSS WDOG bite.

config CLD_LL_CORE
	tristate "Qualcomm CORE driver for QCA6714"
	select WIRELESS_EXT
+8 −0
Original line number Diff line number Diff line
@@ -639,6 +639,14 @@ void wcnss_pronto_log_debug_regs(void)
}
EXPORT_SYMBOL(wcnss_pronto_log_debug_regs);

#ifdef CONFIG_WCNSS_REGISTER_DUMP_ON_BITE
void wcnss_log_debug_regs_on_bite(void)
{
	if (wcnss_hardware_type() == WCNSS_PRONTO_HW)
		wcnss_pronto_log_debug_regs();
}
#endif

/* interface to reset wcnss by sending the reset interrupt */
void wcnss_reset_intr(void)
{
+7 −0
Original line number Diff line number Diff line
@@ -79,6 +79,13 @@ void wcnss_riva_dump_pmic_regs(void);
int wcnss_xo_auto_detect_enabled(void);
u32 wcnss_get_wlan_rx_buff_count(void);
int wcnss_wlan_iris_xo_mode(void);
#ifdef CONFIG_WCNSS_REGISTER_DUMP_ON_BITE
void wcnss_log_debug_regs_on_bite(void);
#else
static inline void wcnss_log_debug_regs_on_bite(void)
{
}
#endif

#define wcnss_wlan_get_drvdata(dev) dev_get_drvdata(dev)
#define wcnss_wlan_set_drvdata(dev, data) dev_set_drvdata((dev), (data))