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
59
|
/*
* Remote processor resources
*
* Copyright (C) 2011 Texas Instruments, Inc.
* Copyright (C) 2011 Google, Inc.
*
* Fernando Guzman Lugo <fernando.lugo@ti.com>
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*/
#ifndef _PLAT_OMAP_RPRES_H
#define _PLAT_OMAP_RPRES_H
enum rpres_constraint {
RPRES_CONSTRAINT_SCALE,
RPRES_CONSTRAINT_LATENCY,
RPRES_CONSTRAINT_BANDWIDTH,
};
enum {
RPRES_INACTIVE,
RPRES_ACTIVE,
};
struct rpres_ops {
int (*start)(struct platform_device *pdev);
int (*stop)(struct platform_device *pdev);
int (*set_lat)(struct platform_device *pdev, long v);
int (*set_bw)(struct platform_device *pdev, long v);
int (*scale_dev)(struct platform_device *pdev, long v);
};
struct rpres_platform_data {
const char *name;
const char *oh_name;
struct omap_hwmod *oh;
struct rpres_ops *ops;
struct clk *opt_clk;
const char *opt_clk_name;
struct device *(*get_dev)(void);
};
struct rpres {
struct list_head next;
const char *name;
struct platform_device *pdev;
int state;
struct mutex lock;
};
struct rpres *rpres_get(const char *);
void rpres_put(struct rpres *);
int rpres_set_constraints(struct rpres *, enum rpres_constraint type, long val);
unsigned long rpres_get_max_freq(struct rpres *obj);
#endif /* _PLAT_OMAP_RPRES_H */
|