1 #ifndef __NOUVEAU_BUS_H__
2 #define __NOUVEAU_BUS_H__
4 #include <core/subdev.h>
5 #include <core/device.h>
7 struct nouveau_bus_intr {
13 struct nouveau_subdev base;
16 static inline struct nouveau_bus *
17 nouveau_bus(void *obj)
19 return (void *)nv_device(obj)->subdev[NVDEV_SUBDEV_BUS];
22 #define nouveau_bus_create(p, e, o, d) \
23 nouveau_subdev_create_((p), (e), (o), 0, "PBUS", "master", \
24 sizeof(**d), (void **)d)
25 #define nouveau_bus_destroy(p) \
26 nouveau_subdev_destroy(&(p)->base)
27 #define nouveau_bus_init(p) \
28 nouveau_subdev_init(&(p)->base)
29 #define nouveau_bus_fini(p, s) \
30 nouveau_subdev_fini(&(p)->base, (s))
32 #define _nouveau_bus_dtor _nouveau_subdev_dtor
33 #define _nouveau_bus_init _nouveau_subdev_init
34 #define _nouveau_bus_fini _nouveau_subdev_fini
36 extern struct nouveau_oclass nv04_bus_oclass;
37 extern struct nouveau_oclass nv31_bus_oclass;
38 extern struct nouveau_oclass nv50_bus_oclass;
39 extern struct nouveau_oclass nvc0_bus_oclass;