lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1417007294-19869-2-git-send-email-daniel.lezcano@linaro.org>
Date:	Wed, 26 Nov 2014 14:08:12 +0100
From:	Daniel Lezcano <daniel.lezcano@...aro.org>
To:	tglx@...utronix.de
Cc:	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	ezequiel.garcia@...e-electrons.com, yl22@....com
Subject: [PATCH 2/4] clocksource: armada-370-xp: Add missing clock enable

From: Ezequiel Garcia <ezequiel.garcia@...e-electrons.com>

This commit makes sure the timer clock is prepared and enabled
before retrieving its rate.

Acked-by: Jason Cooper <jason@...edaemon.net>
Acked-by: Gregory CLEMENT <gregory.clement@...e-electrons.com>
Acked-by: Wim Van Sebroeck <wim@...ana.be>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@...e-electrons.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@...aro.org>
---
 drivers/clocksource/time-armada-370-xp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/clocksource/time-armada-370-xp.c b/drivers/clocksource/time-armada-370-xp.c
index 0451e62..d8555f9 100644
--- a/drivers/clocksource/time-armada-370-xp.c
+++ b/drivers/clocksource/time-armada-370-xp.c
@@ -293,6 +293,7 @@ static void __init armada_xp_timer_init(struct device_node *np)
 
 	/* The 25Mhz fixed clock is mandatory, and must always be available */
 	BUG_ON(IS_ERR(clk));
+	clk_prepare_enable(clk);
 	timer_clk = clk_get_rate(clk);
 
 	armada_370_xp_timer_common_init(np);
@@ -305,6 +306,7 @@ static void __init armada_370_timer_init(struct device_node *np)
 	struct clk *clk = of_clk_get(np, 0);
 
 	BUG_ON(IS_ERR(clk));
+	clk_prepare_enable(clk);
 	timer_clk = clk_get_rate(clk) / TIMER_DIVIDER;
 	timer25Mhz = false;
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ