[ARM] 3361/1: S3C24XX - add USB bus clock source
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / arm / mach-s3c2410 / clock.h
CommitLineData
1da177e4
LT
1/*
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
13struct clk {
14 struct list_head list;
15 struct module *owner;
16 struct clk *parent;
17 const char *name;
18 int id;
2a513ce7 19 int usage;
1da177e4
LT
20 unsigned long rate;
21 unsigned long ctrlbit;
d3468daa 22
1da177e4 23 int (*enable)(struct clk *, int enable);
6e8908ed
BD
24 int (*set_rate)(struct clk *c, unsigned long rate);
25 unsigned long (*round_rate)(struct clk *c, unsigned long rate);
d3468daa 26 int (*set_parent)(struct clk *c, struct clk *parent);
1da177e4
LT
27};
28
29/* other clocks which may be registered by board support */
30
31extern struct clk s3c24xx_dclk0;
32extern struct clk s3c24xx_dclk1;
33extern struct clk s3c24xx_clkout0;
34extern struct clk s3c24xx_clkout1;
35extern struct clk s3c24xx_uclk;
36
36c64af4
BD
37extern struct clk clk_usb_bus;
38
1da177e4
LT
39/* exports for arch/arm/mach-s3c2410
40 *
41 * Please DO NOT use these outside of arch/arm/mach-s3c2410
42*/
43
36c64af4
BD
44extern struct mutex clocks_mutex;
45
1da177e4
LT
46extern int s3c24xx_clkcon_enable(struct clk *clk, int enable);
47extern int s3c24xx_register_clock(struct clk *clk);
48
49extern int s3c24xx_setup_clocks(unsigned long xtal,
50 unsigned long fclk,
51 unsigned long hclk,
52 unsigned long pclk);