summaryrefslogtreecommitdiff
path: root/arch/arm/mach-shmobile/include
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2014-03-13 08:36:17 +0900
committerSimon Horman <horms+renesas@verge.net.au>2014-04-14 11:30:11 +0900
commit25f5550f5a4b18fd77a2e719ba63cb34931ab66a (patch)
tree134410e2b2c6e2f26c545dc5bf3bb31539c7046a /arch/arm/mach-shmobile/include
parentedcf139081f501b1468ae6665217e8320d4c75e8 (diff)
downloadlinux-25f5550f5a4b18fd77a2e719ba63cb34931ab66a.tar.gz
linux-25f5550f5a4b18fd77a2e719ba63cb34931ab66a.tar.xz
ARM: shmobile: Introduce shmobile_clk_workaround()
Introduce a new clock workaround function used by DT reference code on the mach-shmobile subarchitecture. The new function shmobile_clk_workaround() is used to configure clkdev to allow DT and platform devices to coexist. It is possible for the DT reference board code to also request enabling of the clock in case the driver does not implement clock control. Signed-off-by: Magnus Damm <damm@opensource.se> [horms+renesas@verge.net.au: Removed trailing blank line] Reviewed-by: Wolfram Sang <wsa@sang-engineering.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'arch/arm/mach-shmobile/include')
-rw-r--r--arch/arm/mach-shmobile/include/mach/clock.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/include/mach/clock.h b/arch/arm/mach-shmobile/include/mach/clock.h
index 03e56074928c..9a93cf924b9c 100644
--- a/arch/arm/mach-shmobile/include/mach/clock.h
+++ b/arch/arm/mach-shmobile/include/mach/clock.h
@@ -1,6 +1,21 @@
#ifndef CLOCK_H
#define CLOCK_H
+#ifdef CONFIG_COMMON_CLK
+/* temporary clock configuration helper for platform devices */
+
+struct clk_name {
+ const char *clk;
+ const char *con_id;
+ const char *dev_id;
+};
+
+void shmobile_clk_workaround(const struct clk_name *clks, int nr_clks,
+ bool enable);
+
+#else /* CONFIG_COMMON_CLK */
+/* legacy clock implementation */
+
unsigned long shmobile_fixed_ratio_clk_recalc(struct clk *clk);
extern struct sh_clk_ops shmobile_fixed_ratio_clk_ops;
@@ -36,4 +51,5 @@ do { \
(p)->div = d; \
} while (0)
+#endif /* CONFIG_COMMON_CLK */
#endif