upload tizen1.0 source
[kernel/linux-2.6.36.git] / arch / arm / mach-s5pv310 / include / mach / dmc.h
1 /* linux/arch/arm/mach-s5pv310/include/mach/dmc.h
2  *
3  * Copyright (c) 2010 Samsung Electronics Co., Ltd.
4  *              http://www.samsung.com/
5  *
6  * S5PV310 - DMC support
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 #ifndef __ASM_ARCH_DMC_H
14 #define __ASM_ARCH_DMC_H __FILE__
15
16 #define NUMBER_OF_COUNTER       4
17
18 #define DEVT0_SEL       0x1000
19 #define DEVT0_ID        0x1010
20 #define DEVT0_IDMSK     0x1014
21 #define DEVT1_ID        0x1110
22 #define DEVT1_IDMSK     0x1114
23 #define DEVT2_ID        0x1210
24 #define DEVT2_IDMSK     0x1214
25 #define DEVT3_ID        0x1310
26 #define DEVT3_IDMSK     0x1314
27
28 enum ppmu_counter {
29         PPMU_PMNCNT0,
30         PPMU_PMCCNT1,
31         PPMU_PMNCNT2,
32         PPMU_PMNCNT3,
33         PPMU_PMNCNT_MAX,
34 };
35
36 enum dmc_ch {
37         DMC0,
38         DMC1,
39 };
40
41 struct s5pv310_dmc_ppmu_hw {
42         void __iomem *dmc_hw_base;
43         unsigned int ccnt;
44         unsigned int event;
45         unsigned int count[NUMBER_OF_COUNTER];
46 };
47
48 struct s5pv310_cpu_ppmu_hw {
49         void __iomem *cpu_hw_base;
50         unsigned int id;
51         unsigned int ccnt;
52         unsigned int event;
53         unsigned int count[NUMBER_OF_COUNTER];
54 };
55
56 extern void s5pv310_dmc_ppmu_reset(struct s5pv310_dmc_ppmu_hw *ppmu);
57 extern void s5pv310_dmc_ppmu_start(struct s5pv310_dmc_ppmu_hw *ppmu);
58 extern void s5pv310_dmc_ppmu_stop(struct s5pv310_dmc_ppmu_hw *ppmu);
59 extern void s5pv310_dmc_ppmu_setevent(struct s5pv310_dmc_ppmu_hw *ppmu,
60                                   unsigned int evt);
61 extern void s5pv310_dmc_ppmu_update(struct s5pv310_dmc_ppmu_hw *ppmu);
62
63 extern void s5pv310_cpu_ppmu_reset(struct s5pv310_cpu_ppmu_hw *ppmu);
64 extern void s5pv310_cpu_ppmu_start(struct s5pv310_cpu_ppmu_hw *ppmu);
65 extern void s5pv310_cpu_ppmu_stop(struct s5pv310_cpu_ppmu_hw *ppmu);
66 extern void s5pv310_cpu_ppmu_setevent(struct s5pv310_cpu_ppmu_hw *ppmu,
67                 unsigned int evt, unsigned int evt_num);
68 extern void s5pv310_cpu_ppmu_update(struct s5pv310_cpu_ppmu_hw *ppmu);
69 #endif /* __ASM_ARCH_DMC_H */
70