xref: /linux/drivers/usb/serial/io_edgeport.h (revision fd531024bad7e5799e968ca70c0d3ca7b96b71ef)
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /************************************************************************
3  *
4  *	io_edgeport.h	Edgeport Linux Interface definitions
5  *
6  *	Copyright (C) 2000 Inside Out Networks, Inc.
7  *
8  ************************************************************************/
9 
10 #if !defined(_IO_EDGEPORT_H_)
11 #define	_IO_EDGEPORT_H_
12 
13 #define MAX_RS232_PORTS		8	/* Max # of RS-232 ports per device */
14 
15 /* typedefs that the insideout headers need */
16 #ifndef LOW8
17 	#define LOW8(a)		((unsigned char)(a & 0xff))
18 #endif
19 #ifndef HIGH8
20 	#define HIGH8(a)	((unsigned char)((a & 0xff00) >> 8))
21 #endif
22 
23 #include "io_usbvend.h"
24 
25 /*
26  *	Product information read from the Edgeport
27  */
28 struct edgeport_product_info {
29 	__u16	ProductId;			/* Product Identifier */
30 	__u8	NumPorts;			/* Number of ports on edgeport */
31 	__u8	ProdInfoVer;			/* What version of structure is this? */
32 
33 	__u32	IsServer        :1;		/* Set if Server */
34 	__u32	IsRS232         :1;		/* Set if RS-232 ports exist */
35 	__u32	IsRS422         :1;		/* Set if RS-422 ports exist */
36 	__u32	IsRS485         :1;		/* Set if RS-485 ports exist */
37 	__u32	IsReserved      :28;		/* Reserved for later expansion */
38 
39 	__u8	RomSize;			/* Size of ROM/E2PROM in K */
40 	__u8	RamSize;			/* Size of external RAM in K */
41 	__u8	CpuRev;				/* CPU revision level (chg only if s/w visible) */
42 	__u8	BoardRev;			/* PCB revision level (chg only if s/w visible) */
43 
44 	__u8	BootMajorVersion;		/* Boot Firmware version: xx. */
45 	__u8	BootMinorVersion;		/*			  yy. */
46 	__le16	BootBuildNumber;		/*			  zzzz (LE format) */
47 
48 	__u8	FirmwareMajorVersion;		/* Operational Firmware version:xx. */
49 	__u8	FirmwareMinorVersion;		/*				yy. */
50 	__le16	FirmwareBuildNumber;		/*				zzzz (LE format) */
51 
52 	__u8	ManufactureDescDate[3];		/* MM/DD/YY when descriptor template was compiled */
53 	__u8	HardwareType;
54 
55 	__u8	iDownloadFile;			/* What to download to EPiC device */
56 	__u8	EpicVer;			/* What version of EPiC spec this device supports */
57 
58 	struct edge_compatibility_bits Epic;
59 };
60 
61 #endif
62