Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/linux
File: cyclades.h
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
[0] Fix | Delete
/* $Revision: 3.0 $$Date: 1998/11/02 14:20:59 $
[1] Fix | Delete
* linux/include/linux/cyclades.h
[2] Fix | Delete
*
[3] Fix | Delete
* This file was initially written by
[4] Fix | Delete
* Randolph Bentson <bentson@grieg.seaslug.org> and is maintained by
[5] Fix | Delete
* Ivan Passos <ivan@cyclades.com>.
[6] Fix | Delete
*
[7] Fix | Delete
* This file contains the general definitions for the cyclades.c driver
[8] Fix | Delete
*$Log: cyclades.h,v $
[9] Fix | Delete
*Revision 3.1 2002/01/29 11:36:16 henrique
[10] Fix | Delete
*added throttle field on struct cyclades_port to indicate whether the
[11] Fix | Delete
*port is throttled or not
[12] Fix | Delete
*
[13] Fix | Delete
*Revision 3.1 2000/04/19 18:52:52 ivan
[14] Fix | Delete
*converted address fields to unsigned long and added fields for physical
[15] Fix | Delete
*addresses on cyclades_card structure;
[16] Fix | Delete
*
[17] Fix | Delete
*Revision 3.0 1998/11/02 14:20:59 ivan
[18] Fix | Delete
*added nports field on cyclades_card structure;
[19] Fix | Delete
*
[20] Fix | Delete
*Revision 2.5 1998/08/03 16:57:01 ivan
[21] Fix | Delete
*added cyclades_idle_stats structure;
[22] Fix | Delete
*
[23] Fix | Delete
*Revision 2.4 1998/06/01 12:09:53 ivan
[24] Fix | Delete
*removed closing_wait2 from cyclades_port structure;
[25] Fix | Delete
*
[26] Fix | Delete
*Revision 2.3 1998/03/16 18:01:12 ivan
[27] Fix | Delete
*changes in the cyclades_port structure to get it closer to the
[28] Fix | Delete
*standard serial port structure;
[29] Fix | Delete
*added constants for new ioctls;
[30] Fix | Delete
*
[31] Fix | Delete
*Revision 2.2 1998/02/17 16:50:00 ivan
[32] Fix | Delete
*changes in the cyclades_port structure (addition of shutdown_wait and
[33] Fix | Delete
*chip_rev variables);
[34] Fix | Delete
*added constants for new ioctls and for CD1400 rev. numbers.
[35] Fix | Delete
*
[36] Fix | Delete
*Revision 2.1 1997/10/24 16:03:00 ivan
[37] Fix | Delete
*added rflow (which allows enabling the CD1400 special flow control
[38] Fix | Delete
*feature) and rtsdtr_inv (which allows DTR/RTS pin inversion) to
[39] Fix | Delete
*cyclades_port structure;
[40] Fix | Delete
*added Alpha support
[41] Fix | Delete
*
[42] Fix | Delete
*Revision 2.0 1997/06/30 10:30:00 ivan
[43] Fix | Delete
*added some new doorbell command constants related to IOCTLW and
[44] Fix | Delete
*UART error signaling
[45] Fix | Delete
*
[46] Fix | Delete
*Revision 1.8 1997/06/03 15:30:00 ivan
[47] Fix | Delete
*added constant ZFIRM_HLT
[48] Fix | Delete
*added constant CyPCI_Ze_win ( = 2 * Cy_PCI_Zwin)
[49] Fix | Delete
*
[50] Fix | Delete
*Revision 1.7 1997/03/26 10:30:00 daniel
[51] Fix | Delete
*new entries at the end of cyclades_port struct to reallocate
[52] Fix | Delete
*variables illegally allocated within card memory.
[53] Fix | Delete
*
[54] Fix | Delete
*Revision 1.6 1996/09/09 18:35:30 bentson
[55] Fix | Delete
*fold in changes for Cyclom-Z -- including structures for
[56] Fix | Delete
*communicating with board as well modest changes to original
[57] Fix | Delete
*structures to support new features.
[58] Fix | Delete
*
[59] Fix | Delete
*Revision 1.5 1995/11/13 21:13:31 bentson
[60] Fix | Delete
*changes suggested by Michael Chastain <mec@duracef.shout.net>
[61] Fix | Delete
*to support use of this file in non-kernel applications
[62] Fix | Delete
*
[63] Fix | Delete
*
[64] Fix | Delete
*/
[65] Fix | Delete
[66] Fix | Delete
#ifndef _LINUX_CYCLADES_H
[67] Fix | Delete
#define _LINUX_CYCLADES_H
[68] Fix | Delete
[69] Fix | Delete
#include <linux/types.h>
[70] Fix | Delete
[71] Fix | Delete
struct cyclades_monitor {
[72] Fix | Delete
unsigned long int_count;
[73] Fix | Delete
unsigned long char_count;
[74] Fix | Delete
unsigned long char_max;
[75] Fix | Delete
unsigned long char_last;
[76] Fix | Delete
};
[77] Fix | Delete
[78] Fix | Delete
/*
[79] Fix | Delete
* These stats all reflect activity since the device was last initialized.
[80] Fix | Delete
* (i.e., since the port was opened with no other processes already having it
[81] Fix | Delete
* open)
[82] Fix | Delete
*/
[83] Fix | Delete
struct cyclades_idle_stats {
[84] Fix | Delete
__kernel_time_t in_use; /* Time device has been in use (secs) */
[85] Fix | Delete
__kernel_time_t recv_idle; /* Time since last char received (secs) */
[86] Fix | Delete
__kernel_time_t xmit_idle; /* Time since last char transmitted (secs) */
[87] Fix | Delete
unsigned long recv_bytes; /* Bytes received */
[88] Fix | Delete
unsigned long xmit_bytes; /* Bytes transmitted */
[89] Fix | Delete
unsigned long overruns; /* Input overruns */
[90] Fix | Delete
unsigned long frame_errs; /* Input framing errors */
[91] Fix | Delete
unsigned long parity_errs; /* Input parity errors */
[92] Fix | Delete
};
[93] Fix | Delete
[94] Fix | Delete
#define CYCLADES_MAGIC 0x4359
[95] Fix | Delete
[96] Fix | Delete
#define CYGETMON 0x435901
[97] Fix | Delete
#define CYGETTHRESH 0x435902
[98] Fix | Delete
#define CYSETTHRESH 0x435903
[99] Fix | Delete
#define CYGETDEFTHRESH 0x435904
[100] Fix | Delete
#define CYSETDEFTHRESH 0x435905
[101] Fix | Delete
#define CYGETTIMEOUT 0x435906
[102] Fix | Delete
#define CYSETTIMEOUT 0x435907
[103] Fix | Delete
#define CYGETDEFTIMEOUT 0x435908
[104] Fix | Delete
#define CYSETDEFTIMEOUT 0x435909
[105] Fix | Delete
#define CYSETRFLOW 0x43590a
[106] Fix | Delete
#define CYGETRFLOW 0x43590b
[107] Fix | Delete
#define CYSETRTSDTR_INV 0x43590c
[108] Fix | Delete
#define CYGETRTSDTR_INV 0x43590d
[109] Fix | Delete
#define CYZSETPOLLCYCLE 0x43590e
[110] Fix | Delete
#define CYZGETPOLLCYCLE 0x43590f
[111] Fix | Delete
#define CYGETCD1400VER 0x435910
[112] Fix | Delete
#define CYSETWAIT 0x435912
[113] Fix | Delete
#define CYGETWAIT 0x435913
[114] Fix | Delete
[115] Fix | Delete
/*************** CYCLOM-Z ADDITIONS ***************/
[116] Fix | Delete
[117] Fix | Delete
#define CZIOC ('M' << 8)
[118] Fix | Delete
#define CZ_NBOARDS (CZIOC|0xfa)
[119] Fix | Delete
#define CZ_BOOT_START (CZIOC|0xfb)
[120] Fix | Delete
#define CZ_BOOT_DATA (CZIOC|0xfc)
[121] Fix | Delete
#define CZ_BOOT_END (CZIOC|0xfd)
[122] Fix | Delete
#define CZ_TEST (CZIOC|0xfe)
[123] Fix | Delete
[124] Fix | Delete
#define CZ_DEF_POLL (HZ/25)
[125] Fix | Delete
[126] Fix | Delete
#define MAX_BOARD 4 /* Max number of boards */
[127] Fix | Delete
#define MAX_DEV 256 /* Max number of ports total */
[128] Fix | Delete
#define CYZ_MAX_SPEED 921600
[129] Fix | Delete
[130] Fix | Delete
#define CYZ_FIFO_SIZE 16
[131] Fix | Delete
[132] Fix | Delete
#define CYZ_BOOT_NWORDS 0x100
[133] Fix | Delete
struct CYZ_BOOT_CTRL {
[134] Fix | Delete
unsigned short nboard;
[135] Fix | Delete
int status[MAX_BOARD];
[136] Fix | Delete
int nchannel[MAX_BOARD];
[137] Fix | Delete
int fw_rev[MAX_BOARD];
[138] Fix | Delete
unsigned long offset;
[139] Fix | Delete
unsigned long data[CYZ_BOOT_NWORDS];
[140] Fix | Delete
};
[141] Fix | Delete
[142] Fix | Delete
[143] Fix | Delete
#ifndef DP_WINDOW_SIZE
[144] Fix | Delete
/*
[145] Fix | Delete
* Memory Window Sizes
[146] Fix | Delete
*/
[147] Fix | Delete
[148] Fix | Delete
#define DP_WINDOW_SIZE (0x00080000) /* window size 512 Kb */
[149] Fix | Delete
#define ZE_DP_WINDOW_SIZE (0x00100000) /* window size 1 Mb (Ze and
[150] Fix | Delete
8Zo V.2 */
[151] Fix | Delete
#define CTRL_WINDOW_SIZE (0x00000080) /* runtime regs 128 bytes */
[152] Fix | Delete
[153] Fix | Delete
/*
[154] Fix | Delete
* CUSTOM_REG - Cyclom-Z/PCI Custom Registers Set. The driver
[155] Fix | Delete
* normally will access only interested on the fpga_id, fpga_version,
[156] Fix | Delete
* start_cpu and stop_cpu.
[157] Fix | Delete
*/
[158] Fix | Delete
[159] Fix | Delete
struct CUSTOM_REG {
[160] Fix | Delete
__u32 fpga_id; /* FPGA Identification Register */
[161] Fix | Delete
__u32 fpga_version; /* FPGA Version Number Register */
[162] Fix | Delete
__u32 cpu_start; /* CPU start Register (write) */
[163] Fix | Delete
__u32 cpu_stop; /* CPU stop Register (write) */
[164] Fix | Delete
__u32 misc_reg; /* Miscellaneous Register */
[165] Fix | Delete
__u32 idt_mode; /* IDT mode Register */
[166] Fix | Delete
__u32 uart_irq_status; /* UART IRQ status Register */
[167] Fix | Delete
__u32 clear_timer0_irq; /* Clear timer interrupt Register */
[168] Fix | Delete
__u32 clear_timer1_irq; /* Clear timer interrupt Register */
[169] Fix | Delete
__u32 clear_timer2_irq; /* Clear timer interrupt Register */
[170] Fix | Delete
__u32 test_register; /* Test Register */
[171] Fix | Delete
__u32 test_count; /* Test Count Register */
[172] Fix | Delete
__u32 timer_select; /* Timer select register */
[173] Fix | Delete
__u32 pr_uart_irq_status; /* Prioritized UART IRQ stat Reg */
[174] Fix | Delete
__u32 ram_wait_state; /* RAM wait-state Register */
[175] Fix | Delete
__u32 uart_wait_state; /* UART wait-state Register */
[176] Fix | Delete
__u32 timer_wait_state; /* timer wait-state Register */
[177] Fix | Delete
__u32 ack_wait_state; /* ACK wait State Register */
[178] Fix | Delete
};
[179] Fix | Delete
[180] Fix | Delete
/*
[181] Fix | Delete
* RUNTIME_9060 - PLX PCI9060ES local configuration and shared runtime
[182] Fix | Delete
* registers. This structure can be used to access the 9060 registers
[183] Fix | Delete
* (memory mapped).
[184] Fix | Delete
*/
[185] Fix | Delete
[186] Fix | Delete
struct RUNTIME_9060 {
[187] Fix | Delete
__u32 loc_addr_range; /* 00h - Local Address Range */
[188] Fix | Delete
__u32 loc_addr_base; /* 04h - Local Address Base */
[189] Fix | Delete
__u32 loc_arbitr; /* 08h - Local Arbitration */
[190] Fix | Delete
__u32 endian_descr; /* 0Ch - Big/Little Endian Descriptor */
[191] Fix | Delete
__u32 loc_rom_range; /* 10h - Local ROM Range */
[192] Fix | Delete
__u32 loc_rom_base; /* 14h - Local ROM Base */
[193] Fix | Delete
__u32 loc_bus_descr; /* 18h - Local Bus descriptor */
[194] Fix | Delete
__u32 loc_range_mst; /* 1Ch - Local Range for Master to PCI */
[195] Fix | Delete
__u32 loc_base_mst; /* 20h - Local Base for Master PCI */
[196] Fix | Delete
__u32 loc_range_io; /* 24h - Local Range for Master IO */
[197] Fix | Delete
__u32 pci_base_mst; /* 28h - PCI Base for Master PCI */
[198] Fix | Delete
__u32 pci_conf_io; /* 2Ch - PCI configuration for Master IO */
[199] Fix | Delete
__u32 filler1; /* 30h */
[200] Fix | Delete
__u32 filler2; /* 34h */
[201] Fix | Delete
__u32 filler3; /* 38h */
[202] Fix | Delete
__u32 filler4; /* 3Ch */
[203] Fix | Delete
__u32 mail_box_0; /* 40h - Mail Box 0 */
[204] Fix | Delete
__u32 mail_box_1; /* 44h - Mail Box 1 */
[205] Fix | Delete
__u32 mail_box_2; /* 48h - Mail Box 2 */
[206] Fix | Delete
__u32 mail_box_3; /* 4Ch - Mail Box 3 */
[207] Fix | Delete
__u32 filler5; /* 50h */
[208] Fix | Delete
__u32 filler6; /* 54h */
[209] Fix | Delete
__u32 filler7; /* 58h */
[210] Fix | Delete
__u32 filler8; /* 5Ch */
[211] Fix | Delete
__u32 pci_doorbell; /* 60h - PCI to Local Doorbell */
[212] Fix | Delete
__u32 loc_doorbell; /* 64h - Local to PCI Doorbell */
[213] Fix | Delete
__u32 intr_ctrl_stat; /* 68h - Interrupt Control/Status */
[214] Fix | Delete
__u32 init_ctrl; /* 6Ch - EEPROM control, Init Control, etc */
[215] Fix | Delete
};
[216] Fix | Delete
[217] Fix | Delete
/* Values for the Local Base Address re-map register */
[218] Fix | Delete
[219] Fix | Delete
#define WIN_RAM 0x00000001L /* set the sliding window to RAM */
[220] Fix | Delete
#define WIN_CREG 0x14000001L /* set the window to custom Registers */
[221] Fix | Delete
[222] Fix | Delete
/* Values timer select registers */
[223] Fix | Delete
[224] Fix | Delete
#define TIMER_BY_1M 0x00 /* clock divided by 1M */
[225] Fix | Delete
#define TIMER_BY_256K 0x01 /* clock divided by 256k */
[226] Fix | Delete
#define TIMER_BY_128K 0x02 /* clock divided by 128k */
[227] Fix | Delete
#define TIMER_BY_32K 0x03 /* clock divided by 32k */
[228] Fix | Delete
[229] Fix | Delete
/****************** ****************** *******************/
[230] Fix | Delete
#endif
[231] Fix | Delete
[232] Fix | Delete
#ifndef ZFIRM_ID
[233] Fix | Delete
/* #include "zfwint.h" */
[234] Fix | Delete
/****************** ****************** *******************/
[235] Fix | Delete
/*
[236] Fix | Delete
* This file contains the definitions for interfacing with the
[237] Fix | Delete
* Cyclom-Z ZFIRM Firmware.
[238] Fix | Delete
*/
[239] Fix | Delete
[240] Fix | Delete
/* General Constant definitions */
[241] Fix | Delete
[242] Fix | Delete
#define MAX_CHAN 64 /* max number of channels per board */
[243] Fix | Delete
[244] Fix | Delete
/* firmware id structure (set after boot) */
[245] Fix | Delete
[246] Fix | Delete
#define ID_ADDRESS 0x00000180L /* signature/pointer address */
[247] Fix | Delete
#define ZFIRM_ID 0x5557465AL /* ZFIRM/U signature */
[248] Fix | Delete
#define ZFIRM_HLT 0x59505B5CL /* ZFIRM needs external power supply */
[249] Fix | Delete
#define ZFIRM_RST 0x56040674L /* RST signal (due to FW reset) */
[250] Fix | Delete
[251] Fix | Delete
#define ZF_TINACT_DEF 1000 /* default inactivity timeout
[252] Fix | Delete
(1000 ms) */
[253] Fix | Delete
#define ZF_TINACT ZF_TINACT_DEF
[254] Fix | Delete
[255] Fix | Delete
struct FIRM_ID {
[256] Fix | Delete
__u32 signature; /* ZFIRM/U signature */
[257] Fix | Delete
__u32 zfwctrl_addr; /* pointer to ZFW_CTRL structure */
[258] Fix | Delete
};
[259] Fix | Delete
[260] Fix | Delete
/* Op. System id */
[261] Fix | Delete
[262] Fix | Delete
#define C_OS_LINUX 0x00000030 /* generic Linux system */
[263] Fix | Delete
[264] Fix | Delete
/* channel op_mode */
[265] Fix | Delete
[266] Fix | Delete
#define C_CH_DISABLE 0x00000000 /* channel is disabled */
[267] Fix | Delete
#define C_CH_TXENABLE 0x00000001 /* channel Tx enabled */
[268] Fix | Delete
#define C_CH_RXENABLE 0x00000002 /* channel Rx enabled */
[269] Fix | Delete
#define C_CH_ENABLE 0x00000003 /* channel Tx/Rx enabled */
[270] Fix | Delete
#define C_CH_LOOPBACK 0x00000004 /* Loopback mode */
[271] Fix | Delete
[272] Fix | Delete
/* comm_parity - parity */
[273] Fix | Delete
[274] Fix | Delete
#define C_PR_NONE 0x00000000 /* None */
[275] Fix | Delete
#define C_PR_ODD 0x00000001 /* Odd */
[276] Fix | Delete
#define C_PR_EVEN 0x00000002 /* Even */
[277] Fix | Delete
#define C_PR_MARK 0x00000004 /* Mark */
[278] Fix | Delete
#define C_PR_SPACE 0x00000008 /* Space */
[279] Fix | Delete
#define C_PR_PARITY 0x000000ff
[280] Fix | Delete
[281] Fix | Delete
#define C_PR_DISCARD 0x00000100 /* discard char with frame/par error */
[282] Fix | Delete
#define C_PR_IGNORE 0x00000200 /* ignore frame/par error */
[283] Fix | Delete
[284] Fix | Delete
/* comm_data_l - data length and stop bits */
[285] Fix | Delete
[286] Fix | Delete
#define C_DL_CS5 0x00000001
[287] Fix | Delete
#define C_DL_CS6 0x00000002
[288] Fix | Delete
#define C_DL_CS7 0x00000004
[289] Fix | Delete
#define C_DL_CS8 0x00000008
[290] Fix | Delete
#define C_DL_CS 0x0000000f
[291] Fix | Delete
#define C_DL_1STOP 0x00000010
[292] Fix | Delete
#define C_DL_15STOP 0x00000020
[293] Fix | Delete
#define C_DL_2STOP 0x00000040
[294] Fix | Delete
#define C_DL_STOP 0x000000f0
[295] Fix | Delete
[296] Fix | Delete
/* interrupt enabling/status */
[297] Fix | Delete
[298] Fix | Delete
#define C_IN_DISABLE 0x00000000 /* zero, disable interrupts */
[299] Fix | Delete
#define C_IN_TXBEMPTY 0x00000001 /* tx buffer empty */
[300] Fix | Delete
#define C_IN_TXLOWWM 0x00000002 /* tx buffer below LWM */
[301] Fix | Delete
#define C_IN_RXHIWM 0x00000010 /* rx buffer above HWM */
[302] Fix | Delete
#define C_IN_RXNNDT 0x00000020 /* rx no new data timeout */
[303] Fix | Delete
#define C_IN_MDCD 0x00000100 /* modem DCD change */
[304] Fix | Delete
#define C_IN_MDSR 0x00000200 /* modem DSR change */
[305] Fix | Delete
#define C_IN_MRI 0x00000400 /* modem RI change */
[306] Fix | Delete
#define C_IN_MCTS 0x00000800 /* modem CTS change */
[307] Fix | Delete
#define C_IN_RXBRK 0x00001000 /* Break received */
[308] Fix | Delete
#define C_IN_PR_ERROR 0x00002000 /* parity error */
[309] Fix | Delete
#define C_IN_FR_ERROR 0x00004000 /* frame error */
[310] Fix | Delete
#define C_IN_OVR_ERROR 0x00008000 /* overrun error */
[311] Fix | Delete
#define C_IN_RXOFL 0x00010000 /* RX buffer overflow */
[312] Fix | Delete
#define C_IN_IOCTLW 0x00020000 /* I/O control w/ wait */
[313] Fix | Delete
#define C_IN_MRTS 0x00040000 /* modem RTS drop */
[314] Fix | Delete
#define C_IN_ICHAR 0x00080000
[315] Fix | Delete
[316] Fix | Delete
/* flow control */
[317] Fix | Delete
[318] Fix | Delete
#define C_FL_OXX 0x00000001 /* output Xon/Xoff flow control */
[319] Fix | Delete
#define C_FL_IXX 0x00000002 /* output Xon/Xoff flow control */
[320] Fix | Delete
#define C_FL_OIXANY 0x00000004 /* output Xon/Xoff (any xon) */
[321] Fix | Delete
#define C_FL_SWFLOW 0x0000000f
[322] Fix | Delete
[323] Fix | Delete
/* flow status */
[324] Fix | Delete
[325] Fix | Delete
#define C_FS_TXIDLE 0x00000000 /* no Tx data in the buffer or UART */
[326] Fix | Delete
#define C_FS_SENDING 0x00000001 /* UART is sending data */
[327] Fix | Delete
#define C_FS_SWFLOW 0x00000002 /* Tx is stopped by received Xoff */
[328] Fix | Delete
[329] Fix | Delete
/* rs_control/rs_status RS-232 signals */
[330] Fix | Delete
[331] Fix | Delete
#define C_RS_PARAM 0x80000000 /* Indicates presence of parameter in
[332] Fix | Delete
IOCTLM command */
[333] Fix | Delete
#define C_RS_RTS 0x00000001 /* RTS */
[334] Fix | Delete
#define C_RS_DTR 0x00000004 /* DTR */
[335] Fix | Delete
#define C_RS_DCD 0x00000100 /* CD */
[336] Fix | Delete
#define C_RS_DSR 0x00000200 /* DSR */
[337] Fix | Delete
#define C_RS_RI 0x00000400 /* RI */
[338] Fix | Delete
#define C_RS_CTS 0x00000800 /* CTS */
[339] Fix | Delete
[340] Fix | Delete
/* commands Host <-> Board */
[341] Fix | Delete
[342] Fix | Delete
#define C_CM_RESET 0x01 /* reset/flush buffers */
[343] Fix | Delete
#define C_CM_IOCTL 0x02 /* re-read CH_CTRL */
[344] Fix | Delete
#define C_CM_IOCTLW 0x03 /* re-read CH_CTRL, intr when done */
[345] Fix | Delete
#define C_CM_IOCTLM 0x04 /* RS-232 outputs change */
[346] Fix | Delete
#define C_CM_SENDXOFF 0x10 /* send Xoff */
[347] Fix | Delete
#define C_CM_SENDXON 0x11 /* send Xon */
[348] Fix | Delete
#define C_CM_CLFLOW 0x12 /* Clear flow control (resume) */
[349] Fix | Delete
#define C_CM_SENDBRK 0x41 /* send break */
[350] Fix | Delete
#define C_CM_INTBACK 0x42 /* Interrupt back */
[351] Fix | Delete
#define C_CM_SET_BREAK 0x43 /* Tx break on */
[352] Fix | Delete
#define C_CM_CLR_BREAK 0x44 /* Tx break off */
[353] Fix | Delete
#define C_CM_CMD_DONE 0x45 /* Previous command done */
[354] Fix | Delete
#define C_CM_INTBACK2 0x46 /* Alternate Interrupt back */
[355] Fix | Delete
#define C_CM_TINACT 0x51 /* set inactivity detection */
[356] Fix | Delete
#define C_CM_IRQ_ENBL 0x52 /* enable generation of interrupts */
[357] Fix | Delete
#define C_CM_IRQ_DSBL 0x53 /* disable generation of interrupts */
[358] Fix | Delete
#define C_CM_ACK_ENBL 0x54 /* enable acknowledged interrupt mode */
[359] Fix | Delete
#define C_CM_ACK_DSBL 0x55 /* disable acknowledged intr mode */
[360] Fix | Delete
#define C_CM_FLUSH_RX 0x56 /* flushes Rx buffer */
[361] Fix | Delete
#define C_CM_FLUSH_TX 0x57 /* flushes Tx buffer */
[362] Fix | Delete
#define C_CM_Q_ENABLE 0x58 /* enables queue access from the
[363] Fix | Delete
driver */
[364] Fix | Delete
#define C_CM_Q_DISABLE 0x59 /* disables queue access from the
[365] Fix | Delete
driver */
[366] Fix | Delete
[367] Fix | Delete
#define C_CM_TXBEMPTY 0x60 /* Tx buffer is empty */
[368] Fix | Delete
#define C_CM_TXLOWWM 0x61 /* Tx buffer low water mark */
[369] Fix | Delete
#define C_CM_RXHIWM 0x62 /* Rx buffer high water mark */
[370] Fix | Delete
#define C_CM_RXNNDT 0x63 /* rx no new data timeout */
[371] Fix | Delete
#define C_CM_TXFEMPTY 0x64
[372] Fix | Delete
#define C_CM_ICHAR 0x65
[373] Fix | Delete
#define C_CM_MDCD 0x70 /* modem DCD change */
[374] Fix | Delete
#define C_CM_MDSR 0x71 /* modem DSR change */
[375] Fix | Delete
#define C_CM_MRI 0x72 /* modem RI change */
[376] Fix | Delete
#define C_CM_MCTS 0x73 /* modem CTS change */
[377] Fix | Delete
#define C_CM_MRTS 0x74 /* modem RTS drop */
[378] Fix | Delete
#define C_CM_RXBRK 0x84 /* Break received */
[379] Fix | Delete
#define C_CM_PR_ERROR 0x85 /* Parity error */
[380] Fix | Delete
#define C_CM_FR_ERROR 0x86 /* Frame error */
[381] Fix | Delete
#define C_CM_OVR_ERROR 0x87 /* Overrun error */
[382] Fix | Delete
#define C_CM_RXOFL 0x88 /* RX buffer overflow */
[383] Fix | Delete
#define C_CM_CMDERROR 0x90 /* command error */
[384] Fix | Delete
#define C_CM_FATAL 0x91 /* fatal error */
[385] Fix | Delete
#define C_CM_HW_RESET 0x92 /* reset board */
[386] Fix | Delete
[387] Fix | Delete
/*
[388] Fix | Delete
* CH_CTRL - This per port structure contains all parameters
[389] Fix | Delete
* that control an specific port. It can be seen as the
[390] Fix | Delete
* configuration registers of a "super-serial-controller".
[391] Fix | Delete
*/
[392] Fix | Delete
[393] Fix | Delete
struct CH_CTRL {
[394] Fix | Delete
__u32 op_mode; /* operation mode */
[395] Fix | Delete
__u32 intr_enable; /* interrupt masking */
[396] Fix | Delete
__u32 sw_flow; /* SW flow control */
[397] Fix | Delete
__u32 flow_status; /* output flow status */
[398] Fix | Delete
__u32 comm_baud; /* baud rate - numerically specified */
[399] Fix | Delete
__u32 comm_parity; /* parity */
[400] Fix | Delete
__u32 comm_data_l; /* data length/stop */
[401] Fix | Delete
__u32 comm_flags; /* other flags */
[402] Fix | Delete
__u32 hw_flow; /* HW flow control */
[403] Fix | Delete
__u32 rs_control; /* RS-232 outputs */
[404] Fix | Delete
__u32 rs_status; /* RS-232 inputs */
[405] Fix | Delete
__u32 flow_xon; /* xon char */
[406] Fix | Delete
__u32 flow_xoff; /* xoff char */
[407] Fix | Delete
__u32 hw_overflow; /* hw overflow counter */
[408] Fix | Delete
__u32 sw_overflow; /* sw overflow counter */
[409] Fix | Delete
__u32 comm_error; /* frame/parity error counter */
[410] Fix | Delete
__u32 ichar;
[411] Fix | Delete
__u32 filler[7];
[412] Fix | Delete
};
[413] Fix | Delete
[414] Fix | Delete
[415] Fix | Delete
/*
[416] Fix | Delete
* BUF_CTRL - This per channel structure contains
[417] Fix | Delete
* all Tx and Rx buffer control for a given channel.
[418] Fix | Delete
*/
[419] Fix | Delete
[420] Fix | Delete
struct BUF_CTRL {
[421] Fix | Delete
__u32 flag_dma; /* buffers are in Host memory */
[422] Fix | Delete
__u32 tx_bufaddr; /* address of the tx buffer */
[423] Fix | Delete
__u32 tx_bufsize; /* tx buffer size */
[424] Fix | Delete
__u32 tx_threshold; /* tx low water mark */
[425] Fix | Delete
__u32 tx_get; /* tail index tx buf */
[426] Fix | Delete
__u32 tx_put; /* head index tx buf */
[427] Fix | Delete
__u32 rx_bufaddr; /* address of the rx buffer */
[428] Fix | Delete
__u32 rx_bufsize; /* rx buffer size */
[429] Fix | Delete
__u32 rx_threshold; /* rx high water mark */
[430] Fix | Delete
__u32 rx_get; /* tail index rx buf */
[431] Fix | Delete
__u32 rx_put; /* head index rx buf */
[432] Fix | Delete
__u32 filler[5]; /* filler to align structures */
[433] Fix | Delete
};
[434] Fix | Delete
[435] Fix | Delete
/*
[436] Fix | Delete
* BOARD_CTRL - This per board structure contains all global
[437] Fix | Delete
* control fields related to the board.
[438] Fix | Delete
*/
[439] Fix | Delete
[440] Fix | Delete
struct BOARD_CTRL {
[441] Fix | Delete
[442] Fix | Delete
/* static info provided by the on-board CPU */
[443] Fix | Delete
__u32 n_channel; /* number of channels */
[444] Fix | Delete
__u32 fw_version; /* firmware version */
[445] Fix | Delete
[446] Fix | Delete
/* static info provided by the driver */
[447] Fix | Delete
__u32 op_system; /* op_system id */
[448] Fix | Delete
__u32 dr_version; /* driver version */
[449] Fix | Delete
[450] Fix | Delete
/* board control area */
[451] Fix | Delete
__u32 inactivity; /* inactivity control */
[452] Fix | Delete
[453] Fix | Delete
/* host to FW commands */
[454] Fix | Delete
__u32 hcmd_channel; /* channel number */
[455] Fix | Delete
__u32 hcmd_param; /* pointer to parameters */
[456] Fix | Delete
[457] Fix | Delete
/* FW to Host commands */
[458] Fix | Delete
__u32 fwcmd_channel; /* channel number */
[459] Fix | Delete
__u32 fwcmd_param; /* pointer to parameters */
[460] Fix | Delete
__u32 zf_int_queue_addr; /* offset for INT_QUEUE structure */
[461] Fix | Delete
[462] Fix | Delete
/* filler so the structures are aligned */
[463] Fix | Delete
__u32 filler[6];
[464] Fix | Delete
};
[465] Fix | Delete
[466] Fix | Delete
/* Host Interrupt Queue */
[467] Fix | Delete
[468] Fix | Delete
#define QUEUE_SIZE (10*MAX_CHAN)
[469] Fix | Delete
[470] Fix | Delete
struct INT_QUEUE {
[471] Fix | Delete
unsigned char intr_code[QUEUE_SIZE];
[472] Fix | Delete
unsigned long channel[QUEUE_SIZE];
[473] Fix | Delete
unsigned long param[QUEUE_SIZE];
[474] Fix | Delete
unsigned long put;
[475] Fix | Delete
unsigned long get;
[476] Fix | Delete
};
[477] Fix | Delete
[478] Fix | Delete
/*
[479] Fix | Delete
* ZFW_CTRL - This is the data structure that includes all other
[480] Fix | Delete
* data structures used by the Firmware.
[481] Fix | Delete
*/
[482] Fix | Delete
[483] Fix | Delete
struct ZFW_CTRL {
[484] Fix | Delete
struct BOARD_CTRL board_ctrl;
[485] Fix | Delete
struct CH_CTRL ch_ctrl[MAX_CHAN];
[486] Fix | Delete
struct BUF_CTRL buf_ctrl[MAX_CHAN];
[487] Fix | Delete
};
[488] Fix | Delete
[489] Fix | Delete
/****************** ****************** *******************/
[490] Fix | Delete
#endif
[491] Fix | Delete
[492] Fix | Delete
#endif /* _LINUX_CYCLADES_H */
[493] Fix | Delete
[494] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function