Nishad Kamdar | 788a4ee | 2020-04-19 18:36:07 +0530 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | /************************************************************************ |
| 3 | * |
| 4 | * io_edgeport.h Edgeport Linux Interface definitions |
| 5 | * |
| 6 | * Copyright (C) 2000 Inside Out Networks, Inc. |
| 7 | * |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 8 | ************************************************************************/ |
| 9 | |
| 10 | #if !defined(_IO_EDGEPORT_H_) |
| 11 | #define _IO_EDGEPORT_H_ |
| 12 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | #define MAX_RS232_PORTS 8 /* Max # of RS-232 ports per device */ |
| 14 | |
| 15 | /* typedefs that the insideout headers need */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 23 | #include "io_usbvend.h" |
| 24 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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. */ |
Greg Kroah-Hartman | a320471 | 2010-05-17 10:33:41 -0700 | [diff] [blame] | 45 | __u8 BootMinorVersion; /* yy. */ |
| 46 | __le16 BootBuildNumber; /* zzzz (LE format) */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 */ |
Greg Kroah-Hartman | 6e8cf77 | 2007-01-18 00:20:19 -0800 | [diff] [blame] | 53 | __u8 HardwareType; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 54 | |
| 55 | __u8 iDownloadFile; /* What to download to EPiC device */ |
Greg Kroah-Hartman | 6e8cf77 | 2007-01-18 00:20:19 -0800 | [diff] [blame] | 56 | __u8 EpicVer; /* What version of EPiC spec this device supports */ |
| 57 | |
| 58 | struct edge_compatibility_bits Epic; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 59 | }; |
| 60 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 61 | #endif |