Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | |
| 13 | struct clk { |
| 14 | struct list_head list; |
| 15 | struct module *owner; |
| 16 | struct clk *parent; |
| 17 | const char *name; |
| 18 | int id; |
Ben Dooks | 2a513ce | 2006-02-08 21:09:05 +0000 | [diff] [blame] | 19 | int usage; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 20 | unsigned long rate; |
| 21 | unsigned long ctrlbit; |
Ben Dooks | d3468da | 2006-03-20 17:10:04 +0000 | [diff] [blame] | 22 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 23 | int (*enable)(struct clk *, int enable); |
Ben Dooks | 6e8908e | 2006-03-20 21:00:08 +0000 | [diff] [blame] | 24 | int (*set_rate)(struct clk *c, unsigned long rate); |
| 25 | unsigned long (*round_rate)(struct clk *c, unsigned long rate); |
Ben Dooks | d3468da | 2006-03-20 17:10:04 +0000 | [diff] [blame] | 26 | int (*set_parent)(struct clk *c, struct clk *parent); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 27 | }; |
| 28 | |
| 29 | /* other clocks which may be registered by board support */ |
| 30 | |
| 31 | extern struct clk s3c24xx_dclk0; |
| 32 | extern struct clk s3c24xx_dclk1; |
| 33 | extern struct clk s3c24xx_clkout0; |
| 34 | extern struct clk s3c24xx_clkout1; |
| 35 | extern struct clk s3c24xx_uclk; |
| 36 | |
Ben Dooks | 36c64af | 2006-03-20 21:00:48 +0000 | [diff] [blame] | 37 | extern struct clk clk_usb_bus; |
| 38 | |
Ben Dooks | 99c1385 | 2006-06-22 22:18:20 +0100 | [diff] [blame^] | 39 | /* core clock support */ |
| 40 | |
| 41 | extern struct clk clk_f; |
| 42 | extern struct clk clk_h; |
| 43 | extern struct clk clk_p; |
| 44 | extern struct clk clk_upll; |
| 45 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 46 | /* exports for arch/arm/mach-s3c2410 |
| 47 | * |
| 48 | * Please DO NOT use these outside of arch/arm/mach-s3c2410 |
| 49 | */ |
| 50 | |
Ben Dooks | 36c64af | 2006-03-20 21:00:48 +0000 | [diff] [blame] | 51 | extern struct mutex clocks_mutex; |
| 52 | |
Ben Dooks | 99c1385 | 2006-06-22 22:18:20 +0100 | [diff] [blame^] | 53 | extern int s3c2410_clkcon_enable(struct clk *clk, int enable); |
| 54 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 55 | extern int s3c24xx_register_clock(struct clk *clk); |
| 56 | |
| 57 | extern int s3c24xx_setup_clocks(unsigned long xtal, |
| 58 | unsigned long fclk, |
| 59 | unsigned long hclk, |
| 60 | unsigned long pclk); |