clock.h 1.6 KB
Newer Older
L
Linus Torvalds 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
/*
 * linux/arch/arm/mach-s3c2410/clock.h
 *
 * Copyright (c) 2004-2005 Simtec Electronics
 *	http://www.simtec.co.uk/products/SWLINUX/
 *	Written by Ben Dooks, <ben@simtec.co.uk>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
*/

struct clk {
	struct list_head      list;
	struct module        *owner;
	struct clk           *parent;
	const char           *name;
	int		      id;
19
	int		      usage;
L
Linus Torvalds 已提交
20 21
	unsigned long         rate;
	unsigned long         ctrlbit;
22

L
Linus Torvalds 已提交
23
	int		    (*enable)(struct clk *, int enable);
24
	int		    (*set_rate)(struct clk *c, unsigned long rate);
25
	unsigned long	    (*get_rate)(struct clk *c);
26
	unsigned long	    (*round_rate)(struct clk *c, unsigned long rate);
27
	int		    (*set_parent)(struct clk *c, struct clk *parent);
L
Linus Torvalds 已提交
28 29 30 31 32 33 34 35 36 37
};

/* other clocks which may be registered by board support */

extern struct clk s3c24xx_dclk0;
extern struct clk s3c24xx_dclk1;
extern struct clk s3c24xx_clkout0;
extern struct clk s3c24xx_clkout1;
extern struct clk s3c24xx_uclk;

38 39
extern struct clk clk_usb_bus;

40 41 42 43 44 45 46
/* core clock support */

extern struct clk clk_f;
extern struct clk clk_h;
extern struct clk clk_p;
extern struct clk clk_upll;

L
Linus Torvalds 已提交
47 48 49 50 51
/* exports for arch/arm/mach-s3c2410
 *
 * Please DO NOT use these outside of arch/arm/mach-s3c2410
*/

52 53
extern struct mutex clocks_mutex;

54 55
extern int s3c2410_clkcon_enable(struct clk *clk, int enable);

L
Linus Torvalds 已提交
56 57 58 59 60 61
extern int s3c24xx_register_clock(struct clk *clk);

extern int s3c24xx_setup_clocks(unsigned long xtal,
				unsigned long fclk,
				unsigned long hclk,
				unsigned long pclk);