Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
cycx_cfm.h
Go to the documentation of this file.
1 /*
2 * cycx_cfm.h Cyclom 2X WAN Link Driver.
3 * Definitions for the Cyclom 2X Firmware Module (CFM).
4 *
5 * Author: Arnaldo Carvalho de Melo <[email protected]>
6 *
7 * Copyright: (c) 1998-2003 Arnaldo Carvalho de Melo
8 *
9 * Based on sdlasfm.h by Gene Kozin <[email protected]>
10 *
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version
14 * 2 of the License, or (at your option) any later version.
15 * ============================================================================
16 * 1998/08/08 acme Initial version.
17 */
18 #ifndef _CYCX_CFM_H
19 #define _CYCX_CFM_H
20 
21 /* Defines */
22 
23 #define CFM_VERSION 2
24 #define CFM_SIGNATURE "CFM - Cyclades CYCX Firmware Module"
25 
26 /* min/max */
27 #define CFM_IMAGE_SIZE 0x20000 /* max size of CYCX code image file */
28 #define CFM_DESCR_LEN 256 /* max length of description string */
29 #define CFM_MAX_CYCX 1 /* max number of compatible adapters */
30 #define CFM_LOAD_BUFSZ 0x400 /* buffer size for reset code (buffer_load) */
31 
32 /* Firmware Commands */
33 #define GEN_POWER_ON 0x1280
34 
35 #define GEN_SET_SEG 0x1401 /* boot segment setting. */
36 #define GEN_BOOT_DAT 0x1402 /* boot data. */
37 #define GEN_START 0x1403 /* board start. */
38 #define GEN_DEFPAR 0x1404 /* buffer length for boot. */
39 
40 /* Adapter Types */
41 #define CYCX_2X 2
42 /* for now only the 2X is supported, no plans to support 8X or 16X */
43 #define CYCX_8X 8
44 #define CYCX_16X 16
45 
46 #define CFID_X25_2X 5200
47 
62 struct cycx_fw_info {
63  unsigned short codeid;
64  unsigned short version;
65  unsigned short adapter[CFM_MAX_CYCX];
66  unsigned long memsize;
67  unsigned short reserved[2];
68  unsigned short startoffs;
69  unsigned short winoffs;
70  unsigned short codeoffs;
71  unsigned long codesize;
72  unsigned short dataoffs;
73  unsigned long datasize;
74 };
75 
86 struct cycx_firmware {
87  char signature[80];
88  unsigned short version;
89  unsigned short checksum;
90  unsigned short reserved[6];
93  unsigned char image[0];
94 };
95 
97  unsigned long reset_size;
98  unsigned long data_size;
99  unsigned long code_size;
100 };
101 #endif /* _CYCX_CFM_H */