Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | #ifndef _LINUX_ISICOM_H |
| 3 | #define _LINUX_ISICOM_H |
| 4 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5 | #define YES 1 |
| 6 | #define NO 0 |
| 7 | |
Jiri Slaby | a547dfe | 2006-01-09 20:54:26 -0800 | [diff] [blame] | 8 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | * ISICOM Driver definitions ... |
| 10 | * |
| 11 | */ |
| 12 | |
| 13 | #define ISICOM_NAME "ISICom" |
| 14 | |
| 15 | /* |
| 16 | * PCI definitions |
| 17 | */ |
| 18 | |
Jiri Slaby | a547dfe | 2006-01-09 20:54:26 -0800 | [diff] [blame] | 19 | #define DEVID_COUNT 9 |
| 20 | #define VENDOR_ID 0x10b5 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | |
| 22 | /* |
| 23 | * These are now officially allocated numbers |
| 24 | */ |
| 25 | |
| 26 | #define ISICOM_NMAJOR 112 /* normal */ |
| 27 | #define ISICOM_CMAJOR 113 /* callout */ |
| 28 | #define ISICOM_MAGIC (('M' << 8) | 'T') |
| 29 | |
Jiri Slaby | a547dfe | 2006-01-09 20:54:26 -0800 | [diff] [blame] | 30 | #define WAKEUP_CHARS 256 /* hard coded for now */ |
| 31 | #define TX_SIZE 254 |
| 32 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 33 | #define BOARD_COUNT 4 |
| 34 | #define PORT_COUNT (BOARD_COUNT*16) |
| 35 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 36 | /* character sizes */ |
| 37 | |
| 38 | #define ISICOM_CS5 0x0000 |
| 39 | #define ISICOM_CS6 0x0001 |
| 40 | #define ISICOM_CS7 0x0002 |
| 41 | #define ISICOM_CS8 0x0003 |
| 42 | |
| 43 | /* stop bits */ |
| 44 | |
| 45 | #define ISICOM_1SB 0x0000 |
| 46 | #define ISICOM_2SB 0x0004 |
| 47 | |
| 48 | /* parity */ |
| 49 | |
| 50 | #define ISICOM_NOPAR 0x0000 |
| 51 | #define ISICOM_ODPAR 0x0008 |
| 52 | #define ISICOM_EVPAR 0x0018 |
| 53 | |
| 54 | /* flow control */ |
| 55 | |
| 56 | #define ISICOM_CTSRTS 0x03 |
| 57 | #define ISICOM_INITIATE_XONXOFF 0x04 |
| 58 | #define ISICOM_RESPOND_XONXOFF 0x08 |
| 59 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 60 | #define BOARD(line) (((line) >> 4) & 0x3) |
| 61 | |
| 62 | /* isi kill queue bitmap */ |
Jiri Slaby | a547dfe | 2006-01-09 20:54:26 -0800 | [diff] [blame] | 63 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 64 | #define ISICOM_KILLTX 0x01 |
| 65 | #define ISICOM_KILLRX 0x02 |
| 66 | |
| 67 | /* isi_board status bitmap */ |
Jiri Slaby | a547dfe | 2006-01-09 20:54:26 -0800 | [diff] [blame] | 68 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 69 | #define FIRMWARE_LOADED 0x0001 |
| 70 | #define BOARD_ACTIVE 0x0002 |
Alan Cox | 6ed847d | 2009-11-30 13:17:30 +0000 | [diff] [blame] | 71 | #define BOARD_INIT 0x0004 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 72 | |
| 73 | /* isi_port status bitmap */ |
| 74 | |
| 75 | #define ISI_CTS 0x1000 |
| 76 | #define ISI_DSR 0x2000 |
| 77 | #define ISI_RI 0x4000 |
| 78 | #define ISI_DCD 0x8000 |
| 79 | #define ISI_DTR 0x0100 |
| 80 | #define ISI_RTS 0x0200 |
| 81 | |
| 82 | |
Jiri Slaby | a547dfe | 2006-01-09 20:54:26 -0800 | [diff] [blame] | 83 | #define ISI_TXOK 0x0001 |
| 84 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 85 | #endif /* ISICOM_H */ |