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