diff options
author | Linus Walleij <linus.walleij@stericsson.com> | 2009-04-23 05:21:30 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-04-28 17:44:12 -0400 |
commit | cd27e485410aa7e7464b0126d968fe8c2a5c045b (patch) | |
tree | 7285da0a3800e3729c37061af8a59189ccc61cd1 /arch/arm/mach-u300/clock.h | |
parent | bd41b99d4661e775ff152f2842782c43dbb30a59 (diff) |
[ARM] 5474/1: U300 clocking framework
This adds the clocking framework and hooks into the clkdevice
for U300 series platforms.
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-u300/clock.h')
-rw-r--r-- | arch/arm/mach-u300/clock.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/arch/arm/mach-u300/clock.h b/arch/arm/mach-u300/clock.h new file mode 100644 index 000000000000..fc6d9ccfe7e3 --- /dev/null +++ b/arch/arm/mach-u300/clock.h | |||
@@ -0,0 +1,53 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-u300/include/mach/clock.h | ||
3 | * | ||
4 | * Copyright (C) 2004 - 2005 Nokia corporation | ||
5 | * Written by Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com> | ||
6 | * Based on clocks.h by Tony Lindgren, Gordon McNutt and RidgeRun, Inc | ||
7 | * Copyright (C) 2007-2009 ST-Ericsson AB | ||
8 | * Adopted to ST-Ericsson U300 platforms by | ||
9 | * Jonas Aaberg <jonas.aberg@stericsson.com> | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License version 2 as | ||
13 | * published by the Free Software Foundation. | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | #ifndef __MACH_CLOCK_H | ||
18 | #define __MACH_CLOCK_H | ||
19 | |||
20 | #include <linux/clk.h> | ||
21 | |||
22 | struct clk { | ||
23 | struct list_head node; | ||
24 | struct module *owner; | ||
25 | struct device *dev; | ||
26 | const char *name; | ||
27 | struct clk *parent; | ||
28 | |||
29 | spinlock_t lock; | ||
30 | unsigned long rate; | ||
31 | bool reset; | ||
32 | __u16 clk_val; | ||
33 | __s8 usecount; | ||
34 | __u32 res_reg; | ||
35 | __u16 res_mask; | ||
36 | |||
37 | bool hw_ctrld; | ||
38 | |||
39 | void (*recalc) (struct clk *); | ||
40 | int (*set_rate) (struct clk *, unsigned long); | ||
41 | unsigned long (*get_rate) (struct clk *); | ||
42 | unsigned long (*round_rate) (struct clk *, unsigned long); | ||
43 | void (*init) (struct clk *); | ||
44 | void (*enable) (struct clk *); | ||
45 | void (*disable) (struct clk *); | ||
46 | }; | ||
47 | |||
48 | void u300_clock_primecells(void); | ||
49 | void u300_unclock_primecells(void); | ||
50 | void u300_enable_intcon_clock(void); | ||
51 | void u300_enable_timer_clock(void); | ||
52 | |||
53 | #endif | ||