File: bus.h

package info (click to toggle)
linux 3.16.7-ckt2-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 734,120 kB
  • ctags: 2,369,605
  • sloc: ansic: 12,212,866; asm: 277,256; perl: 53,999; xml: 47,771; makefile: 30,481; sh: 8,035; python: 6,583; cpp: 5,121; yacc: 4,254; lex: 2,215; awk: 741; pascal: 231; lisp: 218; sed: 30
file content (53 lines) | stat: -rw-r--r-- 1,761 bytes parent folder | download | duplicates (14)
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
#ifndef __NOUVEAU_BUS_H__
#define __NOUVEAU_BUS_H__

#include <core/subdev.h>
#include <core/device.h>

struct nouveau_bus_intr {
	u32 stat;
	u32 unit;
};

struct nouveau_bus {
	struct nouveau_subdev base;
	int (*hwsq_exec)(struct nouveau_bus *, u32 *, u32);
	u32 hwsq_size;
};

static inline struct nouveau_bus *
nouveau_bus(void *obj)
{
	return (void *)nv_device(obj)->subdev[NVDEV_SUBDEV_BUS];
}

#define nouveau_bus_create(p, e, o, d)                                         \
	nouveau_subdev_create_((p), (e), (o), 0, "PBUS", "master",             \
			       sizeof(**d), (void **)d)
#define nouveau_bus_destroy(p)                                                 \
	nouveau_subdev_destroy(&(p)->base)
#define nouveau_bus_init(p)                                                    \
	nouveau_subdev_init(&(p)->base)
#define nouveau_bus_fini(p, s)                                                 \
	nouveau_subdev_fini(&(p)->base, (s))

#define _nouveau_bus_dtor _nouveau_subdev_dtor
#define _nouveau_bus_init _nouveau_subdev_init
#define _nouveau_bus_fini _nouveau_subdev_fini

extern struct nouveau_oclass *nv04_bus_oclass;
extern struct nouveau_oclass *nv31_bus_oclass;
extern struct nouveau_oclass *nv50_bus_oclass;
extern struct nouveau_oclass *nv94_bus_oclass;
extern struct nouveau_oclass *nvc0_bus_oclass;

/* interface to sequencer */
struct nouveau_hwsq;
int  nouveau_hwsq_init(struct nouveau_bus *, struct nouveau_hwsq **);
int  nouveau_hwsq_fini(struct nouveau_hwsq **, bool exec);
void nouveau_hwsq_wr32(struct nouveau_hwsq *, u32 addr, u32 data);
void nouveau_hwsq_setf(struct nouveau_hwsq *, u8 flag, int data);
void nouveau_hwsq_wait(struct nouveau_hwsq *, u8 flag, u8 data);
void nouveau_hwsq_nsec(struct nouveau_hwsq *, u32 nsec);

#endif