1 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
3 * cycx_cfm.h Cyclom 2X WAN Link Driver.
4 * Definitions for the Cyclom 2X Firmware Module (CFM).
6 * Author: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
8 * Copyright: (c) 1998-2003 Arnaldo Carvalho de Melo
10 * Based on sdlasfm.h by Gene Kozin <74604.152@compuserve.com>
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version
15 * 2 of the License, or (at your option) any later version.
16 * ============================================================================
17 * 1998/08/08 acme Initial version.
25 #define CFM_SIGNATURE "CFM - Cyclades CYCX Firmware Module"
28 #define CFM_IMAGE_SIZE 0x20000 /* max size of CYCX code image file */
29 #define CFM_DESCR_LEN 256 /* max length of description string */
30 #define CFM_MAX_CYCX 1 /* max number of compatible adapters */
31 #define CFM_LOAD_BUFSZ 0x400 /* buffer size for reset code (buffer_load) */
33 /* Firmware Commands */
34 #define GEN_POWER_ON 0x1280
36 #define GEN_SET_SEG 0x1401 /* boot segment setting. */
37 #define GEN_BOOT_DAT 0x1402 /* boot data. */
38 #define GEN_START 0x1403 /* board start. */
39 #define GEN_DEFPAR 0x1404 /* buffer length for boot. */
43 /* for now only the 2X is supported, no plans to support 8X or 16X */
47 #define CFID_X25_2X 5200
50 * struct cycx_fw_info - firmware module information.
51 * @codeid - firmware ID
52 * @version - firmware version number
53 * @adapter - compatible adapter types
54 * @memsize - minimum memory size
55 * @reserved - reserved
56 * @startoffs - entry point offset
57 * @winoffs - dual-port memory window offset
58 * @codeoffs - code load offset
59 * @codesize - code size
60 * @dataoffs - configuration data load offset
61 * @datasize - configuration data size
64 unsigned short codeid;
65 unsigned short version;
66 unsigned short adapter[CFM_MAX_CYCX];
67 unsigned long memsize;
68 unsigned short reserved[2];
69 unsigned short startoffs;
70 unsigned short winoffs;
71 unsigned short codeoffs;
72 unsigned long codesize;
73 unsigned short dataoffs;
74 unsigned long datasize;
78 * struct cycx_firmware - CYCX firmware file structure
79 * @signature - CFM file signature
80 * @version - file format version
81 * @checksum - info + image
82 * @reserved - reserved
83 * @descr - description string
84 * @info - firmware module info
85 * @image - code image (variable size)
87 struct cycx_firmware {
89 unsigned short version;
90 unsigned short checksum;
91 unsigned short reserved[6];
92 char descr[CFM_DESCR_LEN];
93 struct cycx_fw_info info;
94 unsigned char image[];
97 struct cycx_fw_header {
98 unsigned long reset_size;
99 unsigned long data_size;
100 unsigned long code_size;
102 #endif /* _CYCX_CFM_H */