]>
git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - arch/arm/mach-mmp/clock.h
2 * linux/arch/arm/mach-mmp/clock.h
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
9 #include <linux/clkdev.h>
12 void (*enable
)(struct clk
*);
13 void (*disable
)(struct clk
*);
14 unsigned long (*getrate
)(struct clk
*);
15 int (*setrate
)(struct clk
*, unsigned long);
19 const struct clkops
*ops
;
21 void __iomem
*clk_rst
; /* clock reset control register */
22 int fnclksel
; /* functional clock select (APBC) */
23 uint32_t enable_val
; /* value for clock enable (APMU) */
28 extern struct clkops apbc_clk_ops
;
29 extern struct clkops apmu_clk_ops
;
31 #define APBC_CLK(_name, _reg, _fnclksel, _rate) \
32 struct clk clk_##_name = { \
33 .clk_rst = APBC_##_reg, \
34 .fnclksel = _fnclksel, \
36 .ops = &apbc_clk_ops, \
39 #define APBC_CLK_OPS(_name, _reg, _fnclksel, _rate, _ops) \
40 struct clk clk_##_name = { \
41 .clk_rst = APBC_##_reg, \
42 .fnclksel = _fnclksel, \
47 #define APMU_CLK(_name, _reg, _eval, _rate) \
48 struct clk clk_##_name = { \
49 .clk_rst = APMU_##_reg, \
50 .enable_val = _eval, \
52 .ops = &apmu_clk_ops, \
55 #define APMU_CLK_OPS(_name, _reg, _eval, _rate, _ops) \
56 struct clk clk_##_name = { \
57 .clk_rst = APMU_##_reg, \
58 .enable_val = _eval, \
63 #define INIT_CLKREG(_clk, _devname, _conname) \
70 extern struct clk clk_pxa168_gpio
;
71 extern struct clk clk_pxa168_timers
;