blob: 7de6822d7b1a3c0978c5a2d588b492bdb39308a7 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002#ifndef _LINUX_ISICOM_H
3#define _LINUX_ISICOM_H
4
Linus Torvalds1da177e2005-04-16 15:20:36 -07005#define YES 1
6#define NO 0
7
Jiri Slabya547dfe2006-01-09 20:54:26 -08008/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07009 * ISICOM Driver definitions ...
10 *
11 */
12
13#define ISICOM_NAME "ISICom"
14
15/*
16 * PCI definitions
17 */
18
Jiri Slabya547dfe2006-01-09 20:54:26 -080019#define DEVID_COUNT 9
20#define VENDOR_ID 0x10b5
Linus Torvalds1da177e2005-04-16 15:20:36 -070021
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 Slabya547dfe2006-01-09 20:54:26 -080030#define WAKEUP_CHARS 256 /* hard coded for now */
31#define TX_SIZE 254
32
Linus Torvalds1da177e2005-04-16 15:20:36 -070033#define BOARD_COUNT 4
34#define PORT_COUNT (BOARD_COUNT*16)
35
Linus Torvalds1da177e2005-04-16 15:20:36 -070036/* 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 Torvalds1da177e2005-04-16 15:20:36 -070060#define BOARD(line) (((line) >> 4) & 0x3)
61
62 /* isi kill queue bitmap */
Jiri Slabya547dfe2006-01-09 20:54:26 -080063
Linus Torvalds1da177e2005-04-16 15:20:36 -070064#define ISICOM_KILLTX 0x01
65#define ISICOM_KILLRX 0x02
66
67 /* isi_board status bitmap */
Jiri Slabya547dfe2006-01-09 20:54:26 -080068
Linus Torvalds1da177e2005-04-16 15:20:36 -070069#define FIRMWARE_LOADED 0x0001
70#define BOARD_ACTIVE 0x0002
Alan Cox6ed847d2009-11-30 13:17:30 +000071#define BOARD_INIT 0x0004
Linus Torvalds1da177e2005-04-16 15:20:36 -070072
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 Slabya547dfe2006-01-09 20:54:26 -080083#define ISI_TXOK 0x0001
84
Linus Torvalds1da177e2005-04-16 15:20:36 -070085#endif /* ISICOM_H */