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

Commit 4da66b63 authored by Alexandre Belloni's avatar Alexandre Belloni Committed by Mike Turquette
Browse files

clk: at91: main: warn when the main crystal frequency is not set



When the main crystal frequency is not set, the main clock is approximated using
the MAINF value in the CKGR_MCFR register. Warn the user in that case.

Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: default avatarBoris BREZILLON <boris.brezillon@overkiz.com>
Signed-off-by: default avatarMike Turquette <mturquette@linaro.org>
parent 942d1d67
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -388,6 +388,7 @@ static unsigned long clk_main_recalc_rate(struct at91_pmc *pmc,
	if (parent_rate)
		return parent_rate;

	pr_warn("Main crystal frequency not set, using approximate value\n");
	tmp = pmc_read(pmc, AT91_CKGR_MCFR);
	if (!(tmp & AT91_PMC_MAINRDY))
		return 0;