[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1394723659-4995-5-git-send-email-maxime.ripard@free-electrons.com>
Date: Thu, 13 Mar 2014 16:14:16 +0100
From: Maxime Ripard <maxime.ripard@...e-electrons.com>
To: Emilio Lopez <emilio@...pez.com.ar>,
Dan Williams <dan.j.williams@...el.com>,
Vinod Koul <vinod.koul@...el.com>
Cc: Mike Turquette <mturquette@...aro.org>,
linux-arm-kernel@...ts.infradead.org, dmaengine@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
linux-sunxi@...glegroups.com, kevin.z.m.zh@...il.com,
sunny@...winnertech.com, shuge@...winnertech.com,
zhuzhenhua@...winnertech.com, andriy.shevchenko@...el.com,
Maxime Ripard <maxime.ripard@...e-electrons.com>
Subject: [PATCH v5 4/7] ARM: sun6i: Protect CPU clock
Right now, AHB is an indirect child clock of the CPU clock. If that happens to
change, since the CPU clock has no other consumers declared in Linux, it would
be shut down, which is not really a good idea.
Prevent this by forcing it enabled.
Signed-off-by: Maxime Ripard <maxime.ripard@...e-electrons.com>
---
arch/arm/mach-sunxi/sun6i.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm/mach-sunxi/sun6i.c b/arch/arm/mach-sunxi/sun6i.c
index c5dc81988ce9..6b3905505fe0 100644
--- a/arch/arm/mach-sunxi/sun6i.c
+++ b/arch/arm/mach-sunxi/sun6i.c
@@ -10,6 +10,7 @@
* warranty of any kind, whether express or implied.
*/
+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/clocksource.h>
#include <linux/init.h>
@@ -22,9 +23,17 @@
static void __init sun6i_dt_init(void)
{
+ struct clk *clk;
+
sunxi_setup_restart();
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+
+ /* Make sure the clocks we absolutely need are enabled */
+ /* CPU clock */
+ clk = clk_get(NULL, "cpu");
+ if (!IS_ERR(clk))
+ clk_prepare_enable(clk);
}
extern void __init sun6i_reset_init(void);
--
1.9.0
--
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