1209ff23fSmrg#ifndef __GENERIC_BUS_H__
2209ff23fSmrg#define __GENERIC_BUS_H__
3209ff23fSmrg
4209ff23fSmrg/* this is meant to be used for proprietary buses where abstraction is needed
5209ff23fSmrg   but they don't occur often enough to warrant a separate helper library */
6209ff23fSmrg
7209ff23fSmrg#include <stdint.h>
8209ff23fSmrg
9209ff23fSmrg#define GB_IOCTL_GET_NAME	1
10209ff23fSmrg          /* third argument is size of the buffer, fourth argument is pointer
11209ff23fSmrg	     to the buffer. Returns the name of the bus */
12209ff23fSmrg#define GB_IOCTL_GET_TYPE	2
13209ff23fSmrg          /* third argument is size of the buffer, fourth argument is pointer
14209ff23fSmrg	     to the buffer. Returns the type of the bus, driver should check
15209ff23fSmrg	     this at initialization time to find out whether they are compatible
16209ff23fSmrg	      */
17209ff23fSmrg
18209ff23fSmrg
19209ff23fSmrgtypedef struct _GENERIC_BUS_Rec *GENERIC_BUS_Ptr;
20209ff23fSmrg
21209ff23fSmrgtypedef struct _GENERIC_BUS_Rec{
2268105dcbSveego        ScrnInfoPtr pScrn;
23209ff23fSmrg        DevUnion  DriverPrivate;
24209ff23fSmrg	Bool (*ioctl)(GENERIC_BUS_Ptr, long, long, char *);
25209ff23fSmrg	Bool (*read)(GENERIC_BUS_Ptr, uint32_t,  uint32_t, uint8_t *);
26209ff23fSmrg	Bool (*write)(GENERIC_BUS_Ptr, uint32_t,  uint32_t, uint8_t *);
27209ff23fSmrg	Bool (*fifo_read)(GENERIC_BUS_Ptr, uint32_t,  uint32_t, uint8_t *);
28209ff23fSmrg	Bool (*fifo_write)(GENERIC_BUS_Ptr, uint32_t,  uint32_t, uint8_t *);
29209ff23fSmrg
30209ff23fSmrg	} GENERIC_BUS_Rec;
31209ff23fSmrg
32209ff23fSmrg
33209ff23fSmrg
34209ff23fSmrg
35209ff23fSmrg
36209ff23fSmrg#endif
37