aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-nomadik/clock.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-nomadik/clock.c')
-rw-r--r--arch/arm/mach-nomadik/clock.c38
1 files changed, 30 insertions, 8 deletions
diff --git a/arch/arm/mach-nomadik/clock.c b/arch/arm/mach-nomadik/clock.c
index 9f92502a0083..60f5bee09f2e 100644
--- a/arch/arm/mach-nomadik/clock.c
+++ b/arch/arm/mach-nomadik/clock.c
@@ -32,14 +32,36 @@ void clk_disable(struct clk *clk)
32} 32}
33EXPORT_SYMBOL(clk_disable); 33EXPORT_SYMBOL(clk_disable);
34 34
35/* Create a clock structure with the given name */ 35/* We have a fixed clock alone, for now */
36int nmdk_clk_create(struct clk *clk, const char *dev_id) 36static struct clk clk_48 = {
37{ 37 .rate = 48 * 1000 * 1000,
38 struct clk_lookup *clkdev; 38};
39
40/*
41 * Catch-all default clock to satisfy drivers using the clk API. We don't
42 * model the actual hardware clocks yet.
43 */
44static struct clk clk_default;
39 45
40 clkdev = clkdev_alloc(clk, NULL, dev_id); 46#define CLK(_clk, dev) \
41 if (!clkdev) 47 { \
42 return -ENOMEM; 48 .clk = _clk, \
43 clkdev_add(clkdev); 49 .dev_id = dev, \
50 }
51
52static struct clk_lookup lookups[] = {
53 CLK(&clk_48, "uart0"),
54 CLK(&clk_48, "uart1"),
55 CLK(&clk_default, "gpio.0"),
56 CLK(&clk_default, "gpio.1"),
57 CLK(&clk_default, "gpio.2"),
58 CLK(&clk_default, "gpio.3"),
59};
60
61static int __init clk_init(void)
62{
63 clkdev_add_table(lookups, ARRAY_SIZE(lookups));
44 return 0; 64 return 0;
45} 65}
66
67arch_initcall(clk_init);