2 * linux/arch/arm/mach-nomadik/clock.c
4 * Copyright (C) 2009 Alessandro Rubini
6 #include <linux/kernel.h>
7 #include <linux/module.h>
8 #include <linux/errno.h>
10 #include <linux/clkdev.h>
14 * The nomadik board uses generic clocks, but the serial pl011 file
15 * calls clk_enable(), clk_disable(), clk_get_rate(), so we provide them
17 unsigned long clk_get_rate(struct clk
*clk
)
21 EXPORT_SYMBOL(clk_get_rate
);
23 /* enable and disable do nothing */
24 int clk_enable(struct clk
*clk
)
28 EXPORT_SYMBOL(clk_enable
);
30 void clk_disable(struct clk
*clk
)
33 EXPORT_SYMBOL(clk_disable
);
35 static struct clk clk_24
= {
39 static struct clk clk_48
= {
40 .rate
= 48 * 1000 * 1000,
44 * Catch-all default clock to satisfy drivers using the clk API. We don't
45 * model the actual hardware clocks yet.
47 static struct clk clk_default
;
49 #define CLK(_clk, dev) \
55 static struct clk_lookup lookups
[] = {
62 CLK(&clk_48
, "uart0"),
63 CLK(&clk_48
, "uart1"),
64 CLK(&clk_default
, "gpio.0"),
65 CLK(&clk_default
, "gpio.1"),
66 CLK(&clk_default
, "gpio.2"),
67 CLK(&clk_default
, "gpio.3"),
68 CLK(&clk_default
, "rng"),
71 int __init
clk_init(void)
73 clkdev_add_table(lookups
, ARRAY_SIZE(lookups
));