1 /* $NetBSD: ppbus_device.h,v 1.5 2005/12/11 12:23:28 christos Exp $ */
3 #ifndef __PPBUS_DEVICE_H
4 #define __PPBUS_DEVICE_H
6 #include <sys/device.h>
8 #include <dev/ppbus/ppbus_msq.h>
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 */
19 /* Parallel Port Bus Device structure. */
20 struct ppbus_device_softc
{
23 u_int16_t mode
; /* current mode of the device */
24 u_int16_t capabilities
; /* ppbus capabilities */
26 /* uint flags; flags */
27 struct ppbus_context ctx
; /* context of the device */
29 /* mode dependent get msq. If NULL,
30 * IEEE1284 code is used */
32 get_xfer
[PPBUS_MAX_XFER
];
34 /* mode dependent put msq. If NULL,
35 * IEEE1284 code is used */
37 put_xfer
[PPBUS_MAX_XFER
];
39 /* Each structure is a node in a list of child devices */
40 SLIST_ENTRY(ppbus_device_softc
) entries
;
43 struct ppbus_attach_args
{
44 /* Available IEEE1284 modes */
45 u_int16_t capabilities
;
51 #endif /* __PPBUS_DEVICE_H */