summaryrefstree
path: root/kernel/drivers/devfreq/exynos5430_ppmu.h
blob: fc5464cd1eb7c9b4ba4e0fd55875df67ba871b5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
 * Copyright (C) 2013 Samsung Electronics
 *               http://www.samsung.com/
 *               Sangkyu Kim <skwith.kim@samsung.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

#ifndef __DEVFREQ_EXYNOS5430_PPMU_H
#define __DEVFREQ_EXYNOS5430_PPMU_H __FILE__

#include <linux/notifier.h>

#include "exynos_ppmu2.h"

enum DEVFREQ_TYPE {
	MIF,
	INT,
	DISP,
	DEVFREQ_TYPE_COUNT,
};

enum DEVFREQ_PPMU {
	PPMU_D0_CPU,
	PPMU_D0_GEN,
	PPMU_D0_RT,
	PPMU_D1_CPU,
	PPMU_D1_GEN,
	PPMU_D1_RT,
	PPMU_COUNT,
};

enum DEVFREQ_PPMU_ADDR {
	PPMU_D0_CPU_ADDR = 0x10480000,
	PPMU_D0_GEN_ADDR = 0x10490000,
	PPMU_D0_RT_ADDR = 0x104A0000,
	PPMU_D1_CPU_ADDR = 0x104B0000,
	PPMU_D1_GEN_ADDR = 0x104C0000,
	PPMU_D1_RT_ADDR = 0x104D0000,
};

struct devfreq_exynos {
	struct list_head node;
	struct ppmu_info *ppmu_list;
	unsigned int ppmu_count;
	unsigned long long val_ccnt;
	unsigned long long val_pmcnt;
	enum DEVFREQ_TYPE type;
};

int exynos5430_devfreq_init(struct devfreq_exynos *de);
int exynos5430_devfreq_register(struct devfreq_exynos *de);
int exynos5430_ppmu_register_notifier(enum DEVFREQ_TYPE type, struct notifier_block *nb);
int exynos5430_ppmu_unregister_notifier(enum DEVFREQ_TYPE type, struct notifier_block *nb);

#endif /* __DEVFREQ_EXYNOS5430_PPMU_H */