2 * Copyright (C) 2009 ST-Ericsson
3 * heavily based on realview platform
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
9 #include <linux/module.h>
10 #include <linux/kernel.h>
11 #include <linux/list.h>
12 #include <linux/errno.h>
13 #include <linux/err.h>
14 #include <linux/clk.h>
15 #include <linux/mutex.h>
17 #include <asm/clkdev.h>
19 /* currently the clk structure
20 * just supports rate. This would
21 * be extended as and when new devices are
28 int clk_enable(struct clk
*clk
)
32 EXPORT_SYMBOL(clk_enable
);
34 void clk_disable(struct clk
*clk
)
37 EXPORT_SYMBOL(clk_disable
);
39 unsigned long clk_get_rate(struct clk
*clk
)
43 EXPORT_SYMBOL(clk_get_rate
);
45 long clk_round_rate(struct clk
*clk
, unsigned long rate
)
50 EXPORT_SYMBOL(clk_round_rate
);
52 int clk_set_rate(struct clk
*clk
, unsigned long rate
)
57 EXPORT_SYMBOL(clk_set_rate
);
60 static struct clk ssp_clk
= {
65 static struct clk f38_clk
= {
69 static struct clk_lookup lookups
[] = {
86 static int __init
clk_init(void)
88 /* register the clock lookups */
89 clkdev_add_table(lookups
, ARRAY_SIZE(lookups
));
92 arch_initcall(clk_init
);