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>
15 struct list_head list
;
22 unsigned long ctrlbit
;
24 int (*enable
)(struct clk
*, int enable
);
25 int (*set_rate
)(struct clk
*c
, unsigned long rate
);
26 unsigned long (*get_rate
)(struct clk
*c
);
27 unsigned long (*round_rate
)(struct clk
*c
, unsigned long rate
);
28 int (*set_parent
)(struct clk
*c
, struct clk
*parent
);
31 /* other clocks which may be registered by board support */
33 extern struct clk s3c24xx_dclk0
;
34 extern struct clk s3c24xx_dclk1
;
35 extern struct clk s3c24xx_clkout0
;
36 extern struct clk s3c24xx_clkout1
;
37 extern struct clk s3c24xx_uclk
;
39 extern struct clk clk_usb_bus
;
41 /* core clock support */
43 extern struct clk clk_f
;
44 extern struct clk clk_h
;
45 extern struct clk clk_p
;
46 extern struct clk clk_mpll
;
47 extern struct clk clk_upll
;
48 extern struct clk clk_epll
;
49 extern struct clk clk_xtal
;
50 extern struct clk clk_ext
;
52 /* S3C64XX specific clocks */
53 extern struct clk clk_h2
;
54 extern struct clk clk_27m
;
55 extern struct clk clk_48m
;
57 /* exports for arch/arm/mach-s3c2410
59 * Please DO NOT use these outside of arch/arm/mach-s3c2410
62 extern spinlock_t clocks_lock
;
64 extern int s3c2410_clkcon_enable(struct clk
*clk
, int enable
);
66 extern int s3c24xx_register_clock(struct clk
*clk
);
67 extern int s3c24xx_register_clocks(struct clk
**clk
, int nr_clks
);
69 extern int s3c24xx_register_baseclocks(unsigned long xtal
);
71 extern void s3c64xx_register_clocks(void);
73 extern void s3c24xx_setup_clocks(unsigned long fclk
,
77 extern void s3c2410_setup_clocks(void);
78 extern void s3c2412_setup_clocks(void);
79 extern void s3c244x_setup_clocks(void);
80 extern void s3c2443_setup_clocks(void);
82 /* S3C64XX specific functions and clocks */
84 extern int s3c64xx_sclk_ctrl(struct clk
*clk
, int enable
);
86 /* Init for pwm clock code */
88 extern void s3c_pwmclk_init(void);