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

Commit d50d7042 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "wcnss: Sample WCNSS TOP AHB clock on WCNSS WDOG bite"

parents 6a30126b 555fa365
Loading
Loading
Loading
Loading
+21 −2
Original line number Diff line number Diff line
@@ -717,8 +717,27 @@ 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)
	struct platform_device *pdev = wcnss_get_platform_device();
	struct clk *measure;
	struct clk *wcnss_debug_mux;
	unsigned long clk_rate;

	if (wcnss_hardware_type() != WCNSS_PRONTO_HW)
		return;

	measure = clk_get(&pdev->dev, "measure");
	wcnss_debug_mux = clk_get(&pdev->dev, "wcnss_debug");

	if (!IS_ERR(measure) && !IS_ERR(wcnss_debug_mux)) {
		clk_set_parent(measure, wcnss_debug_mux);
		clk_rate = clk_get_rate(measure);
		pr_debug("wcnss: clock frequency is: %luHz\n", clk_rate);

		if (clk_rate)
			wcnss_pronto_log_debug_regs();
		else
			pr_err("clock frequency is zero, cannot access PMU or other registers\n");
	}
}
#endif