xref: /linux/drivers/usb/serial/io_edgeport.h (revision 8be98d2f2a0a262f8bf8a0bc1fdf522b3c7aab17)
1*788a4ee6SNishad Kamdar /* SPDX-License-Identifier: GPL-2.0+ */
21da177e4SLinus Torvalds /************************************************************************
31da177e4SLinus Torvalds  *
41da177e4SLinus Torvalds  *	io_edgeport.h	Edgeport Linux Interface definitions
51da177e4SLinus Torvalds  *
61da177e4SLinus Torvalds  *	Copyright (C) 2000 Inside Out Networks, Inc.
71da177e4SLinus Torvalds  *
81da177e4SLinus Torvalds  ************************************************************************/
91da177e4SLinus Torvalds 
101da177e4SLinus Torvalds #if !defined(_IO_EDGEPORT_H_)
111da177e4SLinus Torvalds #define	_IO_EDGEPORT_H_
121da177e4SLinus Torvalds 
131da177e4SLinus Torvalds #define MAX_RS232_PORTS		8	/* Max # of RS-232 ports per device */
141da177e4SLinus Torvalds 
151da177e4SLinus Torvalds /* typedefs that the insideout headers need */
161da177e4SLinus Torvalds #ifndef LOW8
171da177e4SLinus Torvalds 	#define LOW8(a)		((unsigned char)(a & 0xff))
181da177e4SLinus Torvalds #endif
191da177e4SLinus Torvalds #ifndef HIGH8
201da177e4SLinus Torvalds 	#define HIGH8(a)	((unsigned char)((a & 0xff00) >> 8))
211da177e4SLinus Torvalds #endif
221da177e4SLinus Torvalds 
231da177e4SLinus Torvalds #include "io_usbvend.h"
241da177e4SLinus Torvalds 
251da177e4SLinus Torvalds /*
261da177e4SLinus Torvalds  *	Product information read from the Edgeport
271da177e4SLinus Torvalds  */
281da177e4SLinus Torvalds struct edgeport_product_info {
291da177e4SLinus Torvalds 	__u16	ProductId;			/* Product Identifier */
301da177e4SLinus Torvalds 	__u8	NumPorts;			/* Number of ports on edgeport */
311da177e4SLinus Torvalds 	__u8	ProdInfoVer;			/* What version of structure is this? */
321da177e4SLinus Torvalds 
331da177e4SLinus Torvalds 	__u32	IsServer        :1;		/* Set if Server */
341da177e4SLinus Torvalds 	__u32	IsRS232         :1;		/* Set if RS-232 ports exist */
351da177e4SLinus Torvalds 	__u32	IsRS422         :1;		/* Set if RS-422 ports exist */
361da177e4SLinus Torvalds 	__u32	IsRS485         :1;		/* Set if RS-485 ports exist */
371da177e4SLinus Torvalds 	__u32	IsReserved      :28;		/* Reserved for later expansion */
381da177e4SLinus Torvalds 
391da177e4SLinus Torvalds 	__u8	RomSize;			/* Size of ROM/E2PROM in K */
401da177e4SLinus Torvalds 	__u8	RamSize;			/* Size of external RAM in K */
411da177e4SLinus Torvalds 	__u8	CpuRev;				/* CPU revision level (chg only if s/w visible) */
421da177e4SLinus Torvalds 	__u8	BoardRev;			/* PCB revision level (chg only if s/w visible) */
431da177e4SLinus Torvalds 
441da177e4SLinus Torvalds 	__u8	BootMajorVersion;		/* Boot Firmware version: xx. */
451da177e4SLinus Torvalds 	__u8	BootMinorVersion;		/*			  yy. */
461da177e4SLinus Torvalds 	__le16	BootBuildNumber;		/*			  zzzz (LE format) */
471da177e4SLinus Torvalds 
481da177e4SLinus Torvalds 	__u8	FirmwareMajorVersion;		/* Operational Firmware version:xx. */
491da177e4SLinus Torvalds 	__u8	FirmwareMinorVersion;		/*				yy. */
501da177e4SLinus Torvalds 	__le16	FirmwareBuildNumber;		/*				zzzz (LE format) */
511da177e4SLinus Torvalds 
521da177e4SLinus Torvalds 	__u8	ManufactureDescDate[3];		/* MM/DD/YY when descriptor template was compiled */
536e8cf775SGreg Kroah-Hartman 	__u8	HardwareType;
541da177e4SLinus Torvalds 
551da177e4SLinus Torvalds 	__u8	iDownloadFile;			/* What to download to EPiC device */
566e8cf775SGreg Kroah-Hartman 	__u8	EpicVer;			/* What version of EPiC spec this device supports */
576e8cf775SGreg Kroah-Hartman 
586e8cf775SGreg Kroah-Hartman 	struct edge_compatibility_bits Epic;
591da177e4SLinus Torvalds };
601da177e4SLinus Torvalds 
611da177e4SLinus Torvalds #endif
62