1 /* $NetBSD: ppbus_device.h,v 1.6 2008/04/15 15:02:29 cegger Exp $ */
2 
3 #ifndef __PPBUS_DEVICE_H
4 #define __PPBUS_DEVICE_H
5 
6 #include <sys/device.h>
7 
8 #include <dev/ppbus/ppbus_msq.h>
9 
10 
11 /* Parallel Port Bus Device context. */
12 struct ppbus_context {
13         int valid;                      /* 1 if the struct is valid */
14           int mode;                       /* XXX chipset operating mode */
15           struct microseq *curpc;         /* pc in curmsq */
16           struct microseq *curmsq;        /* currently executed microseqence */
17 };
18 
19 /* Parallel Port Bus Device structure. */
20 struct ppbus_device_softc {
21         device_t sc_dev;
22 
23           u_int16_t mode;                         /* current mode of the device */
24           u_int16_t capabilities;                 /* ppbus capabilities */
25 
26           /* uint flags;                     flags */
27           struct ppbus_context ctx;       /* context of the device */
28 
29                                                   /* mode dependent get msq. If NULL,
30                                                    * IEEE1284 code is used */
31           struct ppbus_xfer
32                     get_xfer[PPBUS_MAX_XFER];
33 
34                                                   /* mode dependent put msq. If NULL,
35                                                    * IEEE1284 code is used */
36           struct ppbus_xfer
37                     put_xfer[PPBUS_MAX_XFER];
38 
39           /* Each structure is a node in a list of child devices */
40           SLIST_ENTRY(ppbus_device_softc) entries;
41 };
42 
43 struct ppbus_attach_args {
44           /* Available IEEE1284 modes */
45           u_int16_t capabilities;
46 
47           /* Flags?
48           u_int16_t flags;*/
49 };
50 
51 #endif /* __PPBUS_DEVICE_H */
52