blob: 7c9f62af5ed6bd586671a4bc573d7b607885da9e [file] [log] [blame]
Nishad Kamdar788a4ee2020-04-19 18:36:07 +05301/* SPDX-License-Identifier: GPL-2.0+ */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002/************************************************************************
3 *
4 * io_edgeport.h Edgeport Linux Interface definitions
5 *
6 * Copyright (C) 2000 Inside Out Networks, Inc.
7 *
Linus Torvalds1da177e2005-04-16 15:20:36 -07008 ************************************************************************/
9
10#if !defined(_IO_EDGEPORT_H_)
11#define _IO_EDGEPORT_H_
12
Linus Torvalds1da177e2005-04-16 15:20:36 -070013#define MAX_RS232_PORTS 8 /* Max # of RS-232 ports per device */
14
15/* typedefs that the insideout headers need */
Linus Torvalds1da177e2005-04-16 15:20:36 -070016#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
Linus Torvalds1da177e2005-04-16 15:20:36 -070022
Linus Torvalds1da177e2005-04-16 15:20:36 -070023#include "io_usbvend.h"
24
Linus Torvalds1da177e2005-04-16 15:20:36 -070025/*
26 * Product information read from the Edgeport
27 */
28struct 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. */
Greg Kroah-Hartmana3204712010-05-17 10:33:41 -070045 __u8 BootMinorVersion; /* yy. */
46 __le16 BootBuildNumber; /* zzzz (LE format) */
Linus Torvalds1da177e2005-04-16 15:20:36 -070047
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 */
Greg Kroah-Hartman6e8cf772007-01-18 00:20:19 -080053 __u8 HardwareType;
Linus Torvalds1da177e2005-04-16 15:20:36 -070054
55 __u8 iDownloadFile; /* What to download to EPiC device */
Greg Kroah-Hartman6e8cf772007-01-18 00:20:19 -080056 __u8 EpicVer; /* What version of EPiC spec this device supports */
57
58 struct edge_compatibility_bits Epic;
Linus Torvalds1da177e2005-04-16 15:20:36 -070059};
60
Linus Torvalds1da177e2005-04-16 15:20:36 -070061#endif