Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
[pandora-kernel.git] / arch / arm / mach-msm / clock.h
1 /* arch/arm/mach-msm/clock.h
2  *
3  * Copyright (C) 2007 Google, Inc.
4  * Copyright (c) 2007 QUALCOMM Incorporated
5  *
6  * This software is licensed under the terms of the GNU General Public
7  * License version 2, as published by the Free Software Foundation, and
8  * may be copied, distributed, and modified under those terms.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  */
16
17 #ifndef __ARCH_ARM_MACH_MSM_CLOCK_H
18 #define __ARCH_ARM_MACH_MSM_CLOCK_H
19
20 #include <linux/list.h>
21
22 #define CLKFLAG_INVERT                  0x00000001
23 #define CLKFLAG_NOINVERT                0x00000002
24 #define CLKFLAG_NONEST                  0x00000004
25 #define CLKFLAG_NORESET                 0x00000008
26
27 #define CLK_FIRST_AVAILABLE_FLAG        0x00000100
28 #define CLKFLAG_USE_MIN_MAX_TO_SET      0x00000200
29 #define CLKFLAG_AUTO_OFF                0x00000400
30
31 struct clk {
32         uint32_t id;
33         uint32_t count;
34         uint32_t flags;
35         const char *name;
36         struct list_head list;
37         struct device *dev;
38 };
39
40 #define A11S_CLK_CNTL_ADDR              (MSM_CSR_BASE + 0x100)
41 #define A11S_CLK_SEL_ADDR               (MSM_CSR_BASE + 0x104)
42 #define A11S_VDD_SVS_PLEVEL_ADDR        (MSM_CSR_BASE + 0x124)
43
44 extern struct clk msm_clocks[];
45 extern unsigned msm_num_clocks;
46
47 #endif
48