[PATCH 3/4 v2] ARM: imx: clocksource: make warning a bit more helpful

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Fri Jul 28 13:15:27 PDT 2017


When getting the clk for the gpt fails, the driver assumes a fixed rate.
Add this rate to the warning that is emitted in this case.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
---
The (implicit) v1 contained unrelated changes that are removed here now.

 arch/arm/mach-imx/clocksource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-imx/clocksource.c b/arch/arm/mach-imx/clocksource.c
index 793f84ee4800..4d6c6c2b0bcd 100644
--- a/arch/arm/mach-imx/clocksource.c
+++ b/arch/arm/mach-imx/clocksource.c
@@ -118,7 +118,7 @@ static int imx_gpt_probe(struct device_d *dev)
 	clk_gpt = clk_get(dev, "per");
 	if (IS_ERR(clk_gpt)) {
 		rate = 20000000;
-		dev_err(dev, "failed to get clock\n");
+		dev_err(dev, "failed to get clock, assume %lu Hz\n", rate);
 	} else {
 		rate = clk_get_rate(clk_gpt);
 		if (!rate) {
-- 
2.11.0




More information about the barebox mailing list