Thread (14 messages) 14 messages, 3 authors, 2015-07-30

[PATCH 7/7] clk: sunxi: Add a simple gates driver

From: Chen-Yu Tsai <hidden>
Date: 2015-07-30 07:55:17
Also in: linux-clk

On Tue, Jul 28, 2015 at 4:26 AM, Stephen Boyd [off-list ref] wrote:
On 07/26, Maxime Ripard wrote:
quoted
diff --git a/drivers/clk/sunxi/clk-simple-gates.c b/drivers/clk/sunxi/clk-simple-gates.c
new file mode 100644
index 000000000000..1a3963a8a686
--- /dev/null
+++ b/drivers/clk/sunxi/clk-simple-gates.c
@@ -0,0 +1,159 @@
+/*
+ * Copyright 2015 Maxime Ripard
+ *
+ * Maxime Ripard <maxime.ripard@free-electrons.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
I'm guessing the following were copied from clk-sunxi.c.
quoted
+#include <linux/clk-provider.h>
+#include <linux/clkdev.h>
Is this used?
clk_register_clkdev() is not used in this file, so not needed.
quoted
+#include <linux/of.h>
+#include <linux/of_address.h>
+#include <linux/reset-controller.h>
Is this used?
A remnant of the USB clocks, which has been moved to clk-usb.c.

Not needed here nor in clk-sunxi.c.
quoted
+#include <linux/spinlock.h>
+#include <linux/log2.h>
Is this used?
This is only used for clock factor calculation. Not applicable in
clk-simple-gates.c, so no.
quoted
+
+static DEFINE_SPINLOCK(gates_lock);
+
[...]
quoted
+
+static const int sun4i_a10_ahb_critical_clocks[] __initdata = {
Shouldn't it be __initconst ?
Not sure why our critical clocks lists are __initdata...
quoted
+     14,     /* ahb_sdram */
+};
+
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe linux-clk" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help