[ARM] S3C24XX: Update clock data on resume
[linux-block.git] / arch / arm / plat-s3c24xx / include / plat / clock.h
1 /* linux/include/asm-arm/plat-s3c24xx/clock.h
2  * linux/arch/arm/mach-s3c2410/clock.h
3  *
4  * Copyright (c) 2004-2005 Simtec Electronics
5  *      http://www.simtec.co.uk/products/SWLINUX/
6  *      Written by Ben Dooks, <ben@simtec.co.uk>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License version 2 as
10  * published by the Free Software Foundation.
11 */
12
13 #include <linux/spinlock.h>
14
15 struct clk {
16         struct list_head      list;
17         struct module        *owner;
18         struct clk           *parent;
19         const char           *name;
20         int                   id;
21         int                   usage;
22         unsigned long         rate;
23         unsigned long         ctrlbit;
24
25         int                 (*enable)(struct clk *, int enable);
26         int                 (*set_rate)(struct clk *c, unsigned long rate);
27         unsigned long       (*get_rate)(struct clk *c);
28         unsigned long       (*round_rate)(struct clk *c, unsigned long rate);
29         int                 (*set_parent)(struct clk *c, struct clk *parent);
30 };
31
32 /* other clocks which may be registered by board support */
33
34 extern struct clk s3c24xx_dclk0;
35 extern struct clk s3c24xx_dclk1;
36 extern struct clk s3c24xx_clkout0;
37 extern struct clk s3c24xx_clkout1;
38 extern struct clk s3c24xx_uclk;
39
40 extern struct clk clk_usb_bus;
41
42 /* core clock support */
43
44 extern struct clk clk_f;
45 extern struct clk clk_h;
46 extern struct clk clk_p;
47 extern struct clk clk_mpll;
48 extern struct clk clk_upll;
49 extern struct clk clk_xtal;
50
51 /* exports for arch/arm/mach-s3c2410
52  *
53  * Please DO NOT use these outside of arch/arm/mach-s3c2410
54 */
55
56 extern spinlock_t clocks_lock;
57
58 extern int s3c2410_clkcon_enable(struct clk *clk, int enable);
59
60 extern int s3c24xx_register_clock(struct clk *clk);
61 extern int s3c24xx_register_clocks(struct clk **clk, int nr_clks);
62
63 extern int s3c24xx_register_baseclocks(unsigned long xtal);
64
65 extern void s3c24xx_setup_clocks(unsigned long fclk,
66                                  unsigned long hclk,
67                                  unsigned long pclk);
68
69 extern void s3c2410_setup_clocks(void);
70 extern void s3c2412_setup_clocks(void);
71 extern void s3c244x_setup_clocks(void);
72 extern void s3c2443_setup_clocks(void);
73