upload tizen1.0 source
[kernel/linux-2.6.36.git] / arch / arm / mach-s5pv310 / include / mach / ppmu.h
1 /* linux/arch/arm/mach-s5pv310/include/mach/ppmu.h
2  *
3  * Copyright (c) 2010 Samsung Electronics Co., Ltd.
4  *              http://www.samsung.com/
5  *
6  * S5PV310 - PPMU 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_PPMU_H
14 #define __ASM_ARCH_PPMU_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 ppmu_ch {
37         DMC0,
38         DMC1,
39 };
40
41 struct s5pv310_ppmu_hw {
42         void __iomem *hw_base;
43         unsigned int ccnt;
44         unsigned int event;
45         unsigned int count[NUMBER_OF_COUNTER];
46 };
47
48 extern void s5pv310_ppc_reset(struct s5pv310_ppmu_hw *ppmu);
49 extern void s5pv310_ppc_start(struct s5pv310_ppmu_hw *ppmu);
50 extern void s5pv310_ppc_stop(struct s5pv310_ppmu_hw *ppmu);
51 extern void s5pv310_ppc_setevent(struct s5pv310_ppmu_hw *ppmu,
52                                   unsigned int evt);
53 extern void s5pv310_ppc_update(struct s5pv310_ppmu_hw *ppmu);
54
55 extern void s5pv310_ppmu_reset(struct s5pv310_ppmu_hw *ppmu);
56 extern void s5pv310_ppmu_start(struct s5pv310_ppmu_hw *ppmu);
57 extern void s5pv310_ppmu_stop(struct s5pv310_ppmu_hw *ppmu);
58 extern void s5pv310_ppmu_setevent(struct s5pv310_ppmu_hw *ppmu,
59                 unsigned int evt, unsigned int evt_num);
60 extern void s5pv310_ppmu_update(struct s5pv310_ppmu_hw *ppmu);
61 #endif /* __ASM_ARCH_PPMU_H */
62