clk: at91: main: warn when the main crystal frequency is not set
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>
Tue, 1 Jul 2014 14:12:12 +0000 (16:12 +0200)
committerMike Turquette <mturquette@linaro.org>
Wed, 2 Jul 2014 16:00:52 +0000 (09:00 -0700)
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: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Boris BREZILLON <boris.brezillon@overkiz.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
drivers/clk/at91/clk-main.c

index 733306131b99f5798e20aad930c952987247591f..59fa3cc96c9eb3411691970c63799996613dc8fe 100644 (file)
@@ -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;