GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / arch / arm / plat-samsung / include / plat / clock.h
blob557c6eb3f084f94fd5ed294709e286c336230b25
1 /* linux/arch/arm/plat-s3c/include/plat/clock.h
3 * Copyright (c) 2004-2005 Simtec Electronics
4 * http://www.simtec.co.uk/products/SWLINUX/
5 * Written by Ben Dooks, <ben@simtec.co.uk>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
12 #include <linux/spinlock.h>
14 struct clk;
16 /**
17 * struct clk_ops - standard clock operations
18 * @set_rate: set the clock rate, see clk_set_rate().
19 * @get_rate: get the clock rate, see clk_get_rate().
20 * @round_rate: round a given clock rate, see clk_round_rate().
21 * @set_parent: set the clock's parent, see clk_set_parent().
23 * Group the common clock implementations together so that we
24 * don't have to keep setting the same fiels again. We leave
25 * enable in struct clk.
27 * Adding an extra layer of indirection into the process should
28 * not be a problem as it is unlikely these operations are going
29 * to need to be called quickly.
31 struct clk_ops {
32 int (*set_rate)(struct clk *c, unsigned long rate);
33 unsigned long (*get_rate)(struct clk *c);
34 unsigned long (*round_rate)(struct clk *c, unsigned long rate);
35 int (*set_parent)(struct clk *c, struct clk *parent);
38 struct clk {
39 struct list_head list;
40 struct module *owner;
41 struct clk *parent;
42 const char *name;
43 int id;
44 int usage;
45 unsigned long rate;
46 unsigned long ctrlbit;
48 struct clk_ops *ops;
49 int (*enable)(struct clk *, int enable);
52 /* other clocks which may be registered by board support */
54 extern struct clk s3c24xx_dclk0;
55 extern struct clk s3c24xx_dclk1;
56 extern struct clk s3c24xx_clkout0;
57 extern struct clk s3c24xx_clkout1;
58 extern struct clk s3c24xx_uclk;
60 extern struct clk clk_usb_bus;
62 /* core clock support */
64 extern struct clk clk_f;
65 extern struct clk clk_h;
66 extern struct clk clk_p;
67 extern struct clk clk_mpll;
68 extern struct clk clk_upll;
69 extern struct clk clk_epll;
70 extern struct clk clk_xtal;
71 extern struct clk clk_ext;
73 /* S3C64XX specific clocks */
74 extern struct clk clk_h2;
75 extern struct clk clk_27m;
76 extern struct clk clk_48m;
77 extern struct clk clk_xusbxti;
79 extern int clk_default_setrate(struct clk *clk, unsigned long rate);
80 extern struct clk_ops clk_ops_def_setrate;
82 /* exports for arch/arm/mach-s3c2410
84 * Please DO NOT use these outside of arch/arm/mach-s3c2410
87 extern spinlock_t clocks_lock;
89 extern int s3c2410_clkcon_enable(struct clk *clk, int enable);
91 extern int s3c24xx_register_clock(struct clk *clk);
92 extern int s3c24xx_register_clocks(struct clk **clk, int nr_clks);
94 extern void s3c_register_clocks(struct clk *clk, int nr_clks);
95 extern void s3c_disable_clocks(struct clk *clkp, int nr_clks);
97 extern int s3c24xx_register_baseclocks(unsigned long xtal);
99 extern void s5p_register_clocks(unsigned long xtal_freq);
101 extern void s3c24xx_setup_clocks(unsigned long fclk,
102 unsigned long hclk,
103 unsigned long pclk);
105 extern void s3c2410_setup_clocks(void);
106 extern void s3c2412_setup_clocks(void);
107 extern void s3c244x_setup_clocks(void);
108 extern void s3c2443_setup_clocks(void);
110 /* S3C64XX specific functions and clocks */
112 extern int s3c64xx_sclk_ctrl(struct clk *clk, int enable);
114 /* Init for pwm clock code */
116 extern void s3c_pwmclk_init(void);