ARM: 6103/1: nomadik: define clocks statically
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / arch / arm / mach-nomadik / clock.c
blob7af7850177825100a2453b60a266ea697ccaff9d
1 /*
2 * linux/arch/arm/mach-nomadik/clock.c
4 * Copyright (C) 2009 Alessandro Rubini
5 */
6 #include <linux/kernel.h>
7 #include <linux/module.h>
8 #include <linux/errno.h>
9 #include <linux/clk.h>
10 #include <asm/clkdev.h>
11 #include "clock.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)
19 return clk->rate;
21 EXPORT_SYMBOL(clk_get_rate);
23 /* enable and disable do nothing */
24 int clk_enable(struct clk *clk)
26 return 0;
28 EXPORT_SYMBOL(clk_enable);
30 void clk_disable(struct clk *clk)
33 EXPORT_SYMBOL(clk_disable);
35 /* We have a fixed clock alone, for now */
36 static struct clk clk_48 = {
37 .rate = 48 * 1000 * 1000,
40 #define CLK(_clk, dev) \
41 { \
42 .clk = _clk, \
43 .dev_id = dev, \
46 static struct clk_lookup lookups[] = {
47 CLK(&clk_48, "uart0"),
48 CLK(&clk_48, "uart1"),
51 static int __init clk_init(void)
53 clkdev_add_table(lookups, ARRAY_SIZE(lookups));
54 return 0;
57 arch_initcall(clk_init);