Linux Kernel
3.7.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
drivers
gpu
drm
nouveau
core
include
subdev
clock.h
Go to the documentation of this file.
1
#ifndef __NOUVEAU_CLOCK_H__
2
#define __NOUVEAU_CLOCK_H__
3
4
#include <
core/device.h
>
5
#include <
core/subdev.h
>
6
7
struct
nouveau_pll_vals
;
8
struct
nvbios_pll
;
9
10
struct
nouveau_clock
{
11
struct
nouveau_subdev
base
;
12
13
int
(*
pll_set
)(
struct
nouveau_clock
*,
u32
type
,
u32
freq
);
14
15
/*XXX: die, these are here *only* to support the completely
16
* bat-shit insane what-was-nouveau_hw.c code
17
*/
18
int
(*
pll_calc
)(
struct
nouveau_clock
*,
struct
nvbios_pll
*,
19
int
clk
,
struct
nouveau_pll_vals
*
pv
);
20
int
(*
pll_prog
)(
struct
nouveau_clock
*,
u32
reg1
,
21
struct
nouveau_pll_vals
*
pv
);
22
};
23
24
static
inline
struct
nouveau_clock
*
25
nouveau_clock
(
void
*obj)
26
{
27
return
(
void
*)nv_device(obj)->subdev[
NVDEV_SUBDEV_CLOCK
];
28
}
29
30
#define nouveau_clock_create(p,e,o,d) \
31
nouveau_subdev_create((p), (e), (o), 0, "CLOCK", "clock", d)
32
#define nouveau_clock_destroy(p) \
33
nouveau_subdev_destroy(&(p)->base)
34
#define nouveau_clock_init(p) \
35
nouveau_subdev_init(&(p)->base)
36
#define nouveau_clock_fini(p,s) \
37
nouveau_subdev_fini(&(p)->base, (s))
38
39
int
nouveau_clock_create_
(
struct
nouveau_object
*,
struct
nouveau_object
*,
40
struct
nouveau_oclass
*,
void
*,
u32
,
int
,
void
**);
41
42
#define _nouveau_clock_dtor _nouveau_subdev_dtor
43
#define _nouveau_clock_init _nouveau_subdev_init
44
#define _nouveau_clock_fini _nouveau_subdev_fini
45
46
extern
struct
nouveau_oclass
nv04_clock_oclass
;
47
extern
struct
nouveau_oclass
nv40_clock_oclass
;
48
extern
struct
nouveau_oclass
nv50_clock_oclass
;
49
extern
struct
nouveau_oclass
nva3_clock_oclass
;
50
extern
struct
nouveau_oclass
nvc0_clock_oclass
;
51
52
int
nv04_clock_pll_set
(
struct
nouveau_clock
*,
u32
type
,
u32
freq
);
53
int
nv04_clock_pll_calc
(
struct
nouveau_clock
*,
struct
nvbios_pll
*,
54
int
clk
,
struct
nouveau_pll_vals
*);
55
int
nv04_clock_pll_prog
(
struct
nouveau_clock
*,
u32
reg1
,
56
struct
nouveau_pll_vals
*);
57
int
nva3_clock_pll_calc
(
struct
nouveau_clock
*,
struct
nvbios_pll
*,
58
int
clk
,
struct
nouveau_pll_vals
*);
59
60
#endif
Generated on Thu Jan 10 2013 12:56:44 for Linux Kernel by
1.8.2