1 #ifndef __PPBUS_VAR_H 2 #define __PPBUS_VAR_H 3 4 /* PPBUS mode masks. */ 5 #define PPBUS_COMPATIBLE 0x01 /* Centronics compatible mode */ 6 #define PPBUS_NIBBLE 0x02 /* reverse 4 bit mode */ 7 #define PPBUS_PS2 0x04 /* PS/2 byte mode */ 8 #define PPBUS_EPP 0x08 /* EPP mode, 32 bit */ 9 #define PPBUS_ECP 0x10 /* ECP mode */ 10 #define PPBUS_FAST 0x20 /* Fast Centronics mode */ 11 /* mode aliases */ 12 #define PPBUS_SPP PPBUS_NIBBLE | PPBUS_PS2 /* Won't work! */ 13 #define PPBUS_BYTE PPBUS_PS2 14 #define PPBUS_MASK 0x3f 15 #define PPBUS_OPTIONS_MASK 0xc0 16 /* Useful macros for this field */ 17 #define PPBUS_IS_EPP(mode) ((mode) & PPBUS_EPP) 18 #define PPBUS_IN_EPP_MODE(bus) (PPBUS_IS_EPP(ppbus_get_mode(bus))) 19 #define PPBUS_IN_NIBBLE_MODE(bus) (ppbus_get_mode(bus) & PPBUS_NIBBLE) 20 #define PPBUS_IN_PS2_MODE(bus) (ppbus_get_mode(bus) & PPBUS_PS2) 21 22 /* PPBUS capabilities */ 23 #define PPBUS_HAS_INTR 0x01 /* Interrupt available */ 24 #define PPBUS_HAS_DMA 0x02 /* DMA available */ 25 #define PPBUS_HAS_FIFO 0x04 /* FIFO available */ 26 #define PPBUS_HAS_PS2 0x08 /* PS2 mode capable */ 27 #define PPBUS_HAS_ECP 0x10 /* ECP mode available */ 28 #define PPBUS_HAS_EPP 0x20 /* EPP mode available */ 29 30 /* IEEE flag in soft config */ 31 #define PPBUS_DISABLE_IEEE 0x00 32 #define PPBUS_ENABLE_IEEE 0x01 33 34 /* List of IVARS available to ppbus device drivers */ 35 /* #define PPBUS_IVAR_MODE 0 */ 36 #define PPBUS_IVAR_DMA 1 37 #define PPBUS_IVAR_INTR 2 38 #define PPBUS_IVAR_EPP_PROTO 3 39 #define PPBUS_IVAR_IEEE 4 40 /* Needed by callback's implemented using callout */ 41 #define PPBUS_IVAR_IRQSTAT 5 42 #define PPBUS_IVAR_DMASTAT 6 43 /* other fields are reserved to the ppbus internals */ 44 45 /* EPP protocol versions */ 46 #define PPBUS_EPP_1_9 0x0 /* default */ 47 #define PPBUS_EPP_1_7 0x1 48 49 /* Parallel Port Bus sleep/wakeup queue. */ 50 #define PPBUSPRI (PZERO+8) 51 52 #endif 53