diff options
Diffstat (limited to 'drivers/serial/dz.h')
-rw-r--r-- | drivers/serial/dz.h | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/drivers/serial/dz.h b/drivers/serial/dz.h index 86ef417382bb..9674d4e49872 100644 --- a/drivers/serial/dz.h +++ b/drivers/serial/dz.h | |||
@@ -1,20 +1,22 @@ | |||
1 | /* | 1 | /* |
2 | * dz.h: Serial port driver for DECStations equiped | 2 | * dz.h: Serial port driver for DECstations equipped |
3 | * with the DZ chipset. | 3 | * with the DZ chipset. |
4 | * | 4 | * |
5 | * Copyright (C) 1998 Olivier A. D. Lebaillif | 5 | * Copyright (C) 1998 Olivier A. D. Lebaillif |
6 | * | 6 | * |
7 | * Email: olivier.lebaillif@ifrsys.com | 7 | * Email: olivier.lebaillif@ifrsys.com |
8 | * | 8 | * |
9 | * Copyright (C) 2004, 2006 Maciej W. Rozycki | ||
9 | */ | 10 | */ |
10 | #ifndef DZ_SERIAL_H | 11 | #ifndef DZ_SERIAL_H |
11 | #define DZ_SERIAL_H | 12 | #define DZ_SERIAL_H |
12 | 13 | ||
13 | /* | 14 | /* |
14 | * Definitions for the Control and Status Received. | 15 | * Definitions for the Control and Status Register. |
15 | */ | 16 | */ |
16 | #define DZ_TRDY 0x8000 /* Transmitter empty */ | 17 | #define DZ_TRDY 0x8000 /* Transmitter empty */ |
17 | #define DZ_TIE 0x4000 /* Transmitter Interrupt Enable */ | 18 | #define DZ_TIE 0x4000 /* Transmitter Interrupt Enbl */ |
19 | #define DZ_TLINE 0x0300 /* Transmitter Line Number */ | ||
18 | #define DZ_RDONE 0x0080 /* Receiver data ready */ | 20 | #define DZ_RDONE 0x0080 /* Receiver data ready */ |
19 | #define DZ_RIE 0x0040 /* Receive Interrupt Enable */ | 21 | #define DZ_RIE 0x0040 /* Receive Interrupt Enable */ |
20 | #define DZ_MSE 0x0020 /* Master Scan Enable */ | 22 | #define DZ_MSE 0x0020 /* Master Scan Enable */ |
@@ -22,32 +24,44 @@ | |||
22 | #define DZ_MAINT 0x0008 /* Loop Back Mode */ | 24 | #define DZ_MAINT 0x0008 /* Loop Back Mode */ |
23 | 25 | ||
24 | /* | 26 | /* |
25 | * Definitions for the Received buffer. | 27 | * Definitions for the Receiver Buffer Register. |
26 | */ | 28 | */ |
27 | #define DZ_RBUF_MASK 0x00FF /* Data Mask in the Receive Buffer */ | 29 | #define DZ_RBUF_MASK 0x00FF /* Data Mask */ |
28 | #define DZ_LINE_MASK 0x0300 /* Line Mask in the Receive Buffer */ | 30 | #define DZ_LINE_MASK 0x0300 /* Line Mask */ |
29 | #define DZ_DVAL 0x8000 /* Valid Data indicator */ | 31 | #define DZ_DVAL 0x8000 /* Valid Data indicator */ |
30 | #define DZ_OERR 0x4000 /* Overrun error indicator */ | 32 | #define DZ_OERR 0x4000 /* Overrun error indicator */ |
31 | #define DZ_FERR 0x2000 /* Frame error indicator */ | 33 | #define DZ_FERR 0x2000 /* Frame error indicator */ |
32 | #define DZ_PERR 0x1000 /* Parity error indicator */ | 34 | #define DZ_PERR 0x1000 /* Parity error indicator */ |
33 | 35 | ||
34 | #define LINE(x) (x & DZ_LINE_MASK) >> 8 /* Get the line number from the input buffer */ | 36 | #define LINE(x) ((x & DZ_LINE_MASK) >> 8) /* Get the line number |
35 | #define UCHAR(x) (unsigned char)(x & DZ_RBUF_MASK) | 37 | from the input buffer */ |
38 | #define UCHAR(x) ((unsigned char)(x & DZ_RBUF_MASK)) | ||
36 | 39 | ||
37 | /* | 40 | /* |
38 | * Definitions for the Transmit Register. | 41 | * Definitions for the Transmit Control Register. |
39 | */ | 42 | */ |
40 | #define DZ_LINE_KEYBOARD 0x0001 | 43 | #define DZ_LINE_KEYBOARD 0x0001 |
41 | #define DZ_LINE_MOUSE 0x0002 | 44 | #define DZ_LINE_MOUSE 0x0002 |
42 | #define DZ_LINE_MODEM 0x0004 | 45 | #define DZ_LINE_MODEM 0x0004 |
43 | #define DZ_LINE_PRINTER 0x0008 | 46 | #define DZ_LINE_PRINTER 0x0008 |
44 | 47 | ||
48 | #define DZ_MODEM_RTS 0x0800 /* RTS for the modem line (2) */ | ||
45 | #define DZ_MODEM_DTR 0x0400 /* DTR for the modem line (2) */ | 49 | #define DZ_MODEM_DTR 0x0400 /* DTR for the modem line (2) */ |
50 | #define DZ_PRINT_RTS 0x0200 /* RTS for the prntr line (3) */ | ||
51 | #define DZ_PRINT_DTR 0x0100 /* DTR for the prntr line (3) */ | ||
52 | #define DZ_LNENB 0x000f /* Transmitter Line Enable */ | ||
46 | 53 | ||
47 | /* | 54 | /* |
48 | * Definitions for the Modem Status Register. | 55 | * Definitions for the Modem Status Register. |
49 | */ | 56 | */ |
57 | #define DZ_MODEM_RI 0x0800 /* RI for the modem line (2) */ | ||
58 | #define DZ_MODEM_CD 0x0400 /* CD for the modem line (2) */ | ||
50 | #define DZ_MODEM_DSR 0x0200 /* DSR for the modem line (2) */ | 59 | #define DZ_MODEM_DSR 0x0200 /* DSR for the modem line (2) */ |
60 | #define DZ_MODEM_CTS 0x0100 /* CTS for the modem line (2) */ | ||
61 | #define DZ_PRINT_RI 0x0008 /* RI for the printer line (3) */ | ||
62 | #define DZ_PRINT_CD 0x0004 /* CD for the printer line (3) */ | ||
63 | #define DZ_PRINT_DSR 0x0002 /* DSR for the prntr line (3) */ | ||
64 | #define DZ_PRINT_CTS 0x0001 /* CTS for the prntr line (3) */ | ||
51 | 65 | ||
52 | /* | 66 | /* |
53 | * Definitions for the Transmit Data Register. | 67 | * Definitions for the Transmit Data Register. |