162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0+ */
262306a36Sopenharmony_ci/************************************************************************
362306a36Sopenharmony_ci *
462306a36Sopenharmony_ci *	io_edgeport.h	Edgeport Linux Interface definitions
562306a36Sopenharmony_ci *
662306a36Sopenharmony_ci *	Copyright (C) 2000 Inside Out Networks, Inc.
762306a36Sopenharmony_ci *
862306a36Sopenharmony_ci ************************************************************************/
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci#if !defined(_IO_EDGEPORT_H_)
1162306a36Sopenharmony_ci#define	_IO_EDGEPORT_H_
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci#define MAX_RS232_PORTS		8	/* Max # of RS-232 ports per device */
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ci/* typedefs that the insideout headers need */
1662306a36Sopenharmony_ci#ifndef LOW8
1762306a36Sopenharmony_ci	#define LOW8(a)		((unsigned char)(a & 0xff))
1862306a36Sopenharmony_ci#endif
1962306a36Sopenharmony_ci#ifndef HIGH8
2062306a36Sopenharmony_ci	#define HIGH8(a)	((unsigned char)((a & 0xff00) >> 8))
2162306a36Sopenharmony_ci#endif
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_ci#include "io_usbvend.h"
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ci/*
2662306a36Sopenharmony_ci *	Product information read from the Edgeport
2762306a36Sopenharmony_ci */
2862306a36Sopenharmony_cistruct edgeport_product_info {
2962306a36Sopenharmony_ci	__u16	ProductId;			/* Product Identifier */
3062306a36Sopenharmony_ci	__u8	NumPorts;			/* Number of ports on edgeport */
3162306a36Sopenharmony_ci	__u8	ProdInfoVer;			/* What version of structure is this? */
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_ci	__u32	IsServer        :1;		/* Set if Server */
3462306a36Sopenharmony_ci	__u32	IsRS232         :1;		/* Set if RS-232 ports exist */
3562306a36Sopenharmony_ci	__u32	IsRS422         :1;		/* Set if RS-422 ports exist */
3662306a36Sopenharmony_ci	__u32	IsRS485         :1;		/* Set if RS-485 ports exist */
3762306a36Sopenharmony_ci	__u32	IsReserved      :28;		/* Reserved for later expansion */
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_ci	__u8	RomSize;			/* Size of ROM/E2PROM in K */
4062306a36Sopenharmony_ci	__u8	RamSize;			/* Size of external RAM in K */
4162306a36Sopenharmony_ci	__u8	CpuRev;				/* CPU revision level (chg only if s/w visible) */
4262306a36Sopenharmony_ci	__u8	BoardRev;			/* PCB revision level (chg only if s/w visible) */
4362306a36Sopenharmony_ci
4462306a36Sopenharmony_ci	__u8	BootMajorVersion;		/* Boot Firmware version: xx. */
4562306a36Sopenharmony_ci	__u8	BootMinorVersion;		/*			  yy. */
4662306a36Sopenharmony_ci	__le16	BootBuildNumber;		/*			  zzzz (LE format) */
4762306a36Sopenharmony_ci
4862306a36Sopenharmony_ci	__u8	FirmwareMajorVersion;		/* Operational Firmware version:xx. */
4962306a36Sopenharmony_ci	__u8	FirmwareMinorVersion;		/*				yy. */
5062306a36Sopenharmony_ci	__le16	FirmwareBuildNumber;		/*				zzzz (LE format) */
5162306a36Sopenharmony_ci
5262306a36Sopenharmony_ci	__u8	ManufactureDescDate[3];		/* MM/DD/YY when descriptor template was compiled */
5362306a36Sopenharmony_ci	__u8	HardwareType;
5462306a36Sopenharmony_ci
5562306a36Sopenharmony_ci	__u8	iDownloadFile;			/* What to download to EPiC device */
5662306a36Sopenharmony_ci	__u8	EpicVer;			/* What version of EPiC spec this device supports */
5762306a36Sopenharmony_ci
5862306a36Sopenharmony_ci	struct edge_compatibility_bits Epic;
5962306a36Sopenharmony_ci};
6062306a36Sopenharmony_ci
6162306a36Sopenharmony_ci#endif
62