Ben Skeggs | 2c1a425 | 2012-08-22 23:55:42 -0400 | [diff] [blame] | 1 | #ifndef __NOUVEAU_IBUS_H__ |
| 2 | #define __NOUVEAU_IBUS_H__ |
| 3 | |
| 4 | #include <core/subdev.h> |
| 5 | #include <core/device.h> |
| 6 | |
| 7 | struct nouveau_ibus { |
| 8 | struct nouveau_subdev base; |
| 9 | }; |
| 10 | |
| 11 | static inline struct nouveau_ibus * |
| 12 | nouveau_ibus(void *obj) |
| 13 | { |
| 14 | return (void *)nv_device(obj)->subdev[NVDEV_SUBDEV_IBUS]; |
| 15 | } |
| 16 | |
| 17 | #define nouveau_ibus_create(p,e,o,d) \ |
| 18 | nouveau_subdev_create_((p), (e), (o), 0, "PIBUS", "ibus", \ |
| 19 | sizeof(**d), (void **)d) |
| 20 | #define nouveau_ibus_destroy(p) \ |
| 21 | nouveau_subdev_destroy(&(p)->base) |
| 22 | #define nouveau_ibus_init(p) \ |
| 23 | nouveau_subdev_init(&(p)->base) |
| 24 | #define nouveau_ibus_fini(p,s) \ |
| 25 | nouveau_subdev_fini(&(p)->base, (s)) |
| 26 | |
| 27 | #define _nouveau_ibus_dtor _nouveau_subdev_dtor |
| 28 | #define _nouveau_ibus_init _nouveau_subdev_init |
| 29 | #define _nouveau_ibus_fini _nouveau_subdev_fini |
| 30 | |
Ben Skeggs | c0abf5c | 2012-09-26 13:05:01 +1000 | [diff] [blame] | 31 | extern struct nouveau_oclass nvc0_ibus_oclass; |
Ben Skeggs | 2c1a425 | 2012-08-22 23:55:42 -0400 | [diff] [blame] | 32 | extern struct nouveau_oclass nve0_ibus_oclass; |
Alexandre Courbot | 90a5500c | 2014-05-02 18:32:36 +0900 | [diff] [blame] | 33 | extern struct nouveau_oclass gk20a_ibus_oclass; |
Ben Skeggs | 2c1a425 | 2012-08-22 23:55:42 -0400 | [diff] [blame] | 34 | |
| 35 | #endif |