]> nv-tegra.nvidia Code Review - linux-3.10.git/blob - arch/arm/mach-w90x900/clock.h
Merge branch 'timers-for-linus-hpet' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-3.10.git] / arch / arm / mach-w90x900 / clock.h
1 /*
2  * linux/arch/arm/mach-w90x900/clock.h
3  *
4  * Copyright (c) 2008 Nuvoton technology corporation
5  *
6  * Wan ZongShun <mcuos.com@gmail.com>
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 as published by
10  * the Free Software Foundation; either version 2 of the License.
11  */
12
13 #include <asm/clkdev.h>
14
15 void nuc900_clk_enable(struct clk *clk, int enable);
16 void nuc900_subclk_enable(struct clk *clk, int enable);
17 void clks_register(struct clk_lookup *clks, size_t num);
18
19 struct clk {
20         unsigned long           cken;
21         unsigned int            enabled;
22         void                    (*enable)(struct clk *, int enable);
23 };
24
25 #define DEFINE_CLK(_name, _ctrlbit)                     \
26 struct clk clk_##_name = {                              \
27                 .enable = nuc900_clk_enable,            \
28                 .cken   = (1 << _ctrlbit),              \
29         }
30
31 #define DEFINE_SUBCLK(_name, _ctrlbit)                  \
32 struct clk clk_##_name = {                              \
33                 .enable = nuc900_subclk_enable, \
34                 .cken   = (1 << _ctrlbit),              \
35         }
36
37
38 #define DEF_CLKLOOK(_clk, _devname, _conname)           \
39         {                                               \
40                 .clk            = _clk,                 \
41                 .dev_id         = _devname,             \
42                 .con_id         = _conname,             \
43         }
44