⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cyclades.h

📁 Axis 221 camera embedded programing interface
💻 H
📖 第 1 页 / 共 2 页
字号:
/* $Revision: 3.0 $$Date: 1998/11/02 14:20:59 $ * linux/include/linux/cyclades.h * * This file was initially written by * Randolph Bentson <bentson@grieg.seaslug.org> and is maintained by * Ivan Passos <ivan@cyclades.com>. * * This file contains the general definitions for the cyclades.c driver *$Log: cyclades.h,v $ *Revision 3.1  2002/01/29 11:36:16  henrique *added throttle field on struct cyclades_port to indicate whether the *port is throttled or not * *Revision 3.1  2000/04/19 18:52:52  ivan *converted address fields to unsigned long and added fields for physical *addresses on cyclades_card structure; * *Revision 3.0  1998/11/02 14:20:59  ivan *added nports field on cyclades_card structure; * *Revision 2.5  1998/08/03 16:57:01  ivan *added cyclades_idle_stats structure; *  *Revision 2.4  1998/06/01 12:09:53  ivan *removed closing_wait2 from cyclades_port structure; * *Revision 2.3  1998/03/16 18:01:12  ivan *changes in the cyclades_port structure to get it closer to the  *standard serial port structure; *added constants for new ioctls; * *Revision 2.2  1998/02/17 16:50:00  ivan *changes in the cyclades_port structure (addition of shutdown_wait and  *chip_rev variables); *added constants for new ioctls and for CD1400 rev. numbers. * *Revision 2.1	1997/10/24 16:03:00  ivan *added rflow (which allows enabling the CD1400 special flow control  *feature) and rtsdtr_inv (which allows DTR/RTS pin inversion) to  *cyclades_port structure; *added Alpha support * *Revision 2.0  1997/06/30 10:30:00  ivan *added some new doorbell command constants related to IOCTLW and *UART error signaling * *Revision 1.8  1997/06/03 15:30:00  ivan *added constant ZFIRM_HLT *added constant CyPCI_Ze_win ( = 2 * Cy_PCI_Zwin) * *Revision 1.7  1997/03/26 10:30:00  daniel *new entries at the end of cyclades_port struct to reallocate *variables illegally allocated within card memory. * *Revision 1.6  1996/09/09 18:35:30  bentson *fold in changes for Cyclom-Z -- including structures for *communicating with board as well modest changes to original *structures to support new features. * *Revision 1.5  1995/11/13 21:13:31  bentson *changes suggested by Michael Chastain <mec@duracef.shout.net> *to support use of this file in non-kernel applications * * */#ifndef _LINUX_CYCLADES_H#define _LINUX_CYCLADES_Hstruct cyclades_monitor {        unsigned long           int_count;        unsigned long           char_count;        unsigned long           char_max;        unsigned long           char_last;};/* * These stats all reflect activity since the device was last initialized. * (i.e., since the port was opened with no other processes already having it * open) */struct cyclades_idle_stats {    time_t	   in_use;	/* Time device has been in use (secs) */    time_t	   recv_idle;	/* Time since last char received (secs) */    time_t	   xmit_idle;	/* Time since last char transmitted (secs) */    unsigned long  recv_bytes;	/* Bytes received */    unsigned long  xmit_bytes;	/* Bytes transmitted */    unsigned long  overruns;	/* Input overruns */    unsigned long  frame_errs;	/* Input framing errors */    unsigned long  parity_errs;	/* Input parity errors */};#define CYCLADES_MAGIC  0x4359#define CYGETMON                0x435901#define CYGETTHRESH             0x435902#define CYSETTHRESH             0x435903#define CYGETDEFTHRESH          0x435904#define CYSETDEFTHRESH          0x435905#define CYGETTIMEOUT            0x435906#define CYSETTIMEOUT            0x435907#define CYGETDEFTIMEOUT         0x435908#define CYSETDEFTIMEOUT         0x435909#define CYSETRFLOW		0x43590a#define CYGETRFLOW		0x43590b#define CYSETRTSDTR_INV		0x43590c#define CYGETRTSDTR_INV		0x43590d#define CYZSETPOLLCYCLE		0x43590e#define CYZGETPOLLCYCLE		0x43590f#define CYGETCD1400VER		0x435910#define CYGETCARDINFO		0x435911#define	CYSETWAIT		0x435912#define	CYGETWAIT		0x435913/*************** CYCLOM-Z ADDITIONS ***************/#define CZIOC           ('M' << 8)#define CZ_NBOARDS      (CZIOC|0xfa)#define CZ_BOOT_START   (CZIOC|0xfb)#define CZ_BOOT_DATA    (CZIOC|0xfc)#define CZ_BOOT_END     (CZIOC|0xfd)#define CZ_TEST         (CZIOC|0xfe)#define CZ_DEF_POLL	(HZ/25)#define MAX_BOARD       4       /* Max number of boards */#define MAX_DEV         256     /* Max number of ports total */#define	CYZ_MAX_SPEED	921600#define	CYZ_FIFO_SIZE	16#define CYZ_BOOT_NWORDS 0x100struct CYZ_BOOT_CTRL {        unsigned short  nboard;        int             status[MAX_BOARD];        int             nchannel[MAX_BOARD];        int             fw_rev[MAX_BOARD];        unsigned long   offset;        unsigned long   data[CYZ_BOOT_NWORDS];};#ifndef DP_WINDOW_SIZE/* #include "cyclomz.h" *//****************** ****************** *******************//* *	The data types defined below are used in all ZFIRM interface *	data structures. They accomodate differences between HW *	architectures and compilers. */#if defined(__alpha__)typedef unsigned long	ucdouble;	/* 64 bits, unsigned */typedef unsigned int	uclong;		/* 32 bits, unsigned */#elsetypedef unsigned long	uclong;		/* 32 bits, unsigned */#endiftypedef unsigned short	ucshort;	/* 16 bits, unsigned */typedef unsigned char	ucchar;		/* 8 bits, unsigned *//* *	Memory Window Sizes */#define	DP_WINDOW_SIZE		(0x00080000)	/* window size 512 Kb */#define	ZE_DP_WINDOW_SIZE	(0x00100000)	/* window size 1 Mb (Ze and						  8Zo V.2 */#define	CTRL_WINDOW_SIZE	(0x00000080)	/* runtime regs 128 bytes *//* *	CUSTOM_REG - Cyclom-Z/PCI Custom Registers Set. The driver *	normally will access only interested on the fpga_id, fpga_version, *	start_cpu and stop_cpu. */struct	CUSTOM_REG {	uclong	fpga_id;		/* FPGA Identification Register */	uclong	fpga_version;		/* FPGA Version Number Register */	uclong	cpu_start;		/* CPU start Register (write) */	uclong	cpu_stop;		/* CPU stop Register (write) */	uclong	misc_reg;		/* Miscelaneous Register */	uclong	idt_mode;		/* IDT mode Register */	uclong	uart_irq_status;	/* UART IRQ status Register */	uclong	clear_timer0_irq;	/* Clear timer interrupt Register */	uclong	clear_timer1_irq;	/* Clear timer interrupt Register */	uclong	clear_timer2_irq;	/* Clear timer interrupt Register */	uclong	test_register;		/* Test Register */	uclong	test_count;		/* Test Count Register */	uclong	timer_select;		/* Timer select register */	uclong	pr_uart_irq_status;	/* Prioritized UART IRQ stat Reg */	uclong	ram_wait_state;		/* RAM wait-state Register */	uclong	uart_wait_state;	/* UART wait-state Register */	uclong	timer_wait_state;	/* timer wait-state Register */	uclong	ack_wait_state;		/* ACK wait State Register */};/* *	RUNTIME_9060 - PLX PCI9060ES local configuration and shared runtime *	registers. This structure can be used to access the 9060 registers *	(memory mapped). */struct RUNTIME_9060 {	uclong	loc_addr_range;	/* 00h - Local Address Range */	uclong	loc_addr_base;	/* 04h - Local Address Base */	uclong	loc_arbitr;	/* 08h - Local Arbitration */	uclong	endian_descr;	/* 0Ch - Big/Little Endian Descriptor */	uclong	loc_rom_range;	/* 10h - Local ROM Range */	uclong	loc_rom_base;	/* 14h - Local ROM Base */	uclong	loc_bus_descr;	/* 18h - Local Bus descriptor */	uclong	loc_range_mst;	/* 1Ch - Local Range for Master to PCI */	uclong	loc_base_mst;	/* 20h - Local Base for Master PCI */	uclong	loc_range_io;	/* 24h - Local Range for Master IO */	uclong	pci_base_mst;	/* 28h - PCI Base for Master PCI */	uclong	pci_conf_io;	/* 2Ch - PCI configuration for Master IO */	uclong	filler1;	/* 30h */	uclong	filler2;	/* 34h */	uclong	filler3;	/* 38h */	uclong	filler4;	/* 3Ch */	uclong	mail_box_0;	/* 40h - Mail Box 0 */	uclong	mail_box_1;	/* 44h - Mail Box 1 */	uclong	mail_box_2;	/* 48h - Mail Box 2 */	uclong	mail_box_3;	/* 4Ch - Mail Box 3 */	uclong	filler5;	/* 50h */	uclong	filler6;	/* 54h */	uclong	filler7;	/* 58h */	uclong	filler8;	/* 5Ch */	uclong	pci_doorbell;	/* 60h - PCI to Local Doorbell */	uclong	loc_doorbell;	/* 64h - Local to PCI Doorbell */	uclong	intr_ctrl_stat;	/* 68h - Interrupt Control/Status */	uclong	init_ctrl;	/* 6Ch - EEPROM control, Init Control, etc */};/* Values for the Local Base Address re-map register */#define	WIN_RAM		0x00000001L	/* set the sliding window to RAM */#define	WIN_CREG	0x14000001L	/* set the window to custom Registers *//* Values timer select registers */#define	TIMER_BY_1M	0x00		/* clock divided by 1M */#define	TIMER_BY_256K	0x01		/* clock divided by 256k */#define	TIMER_BY_128K	0x02		/* clock divided by 128k */#define	TIMER_BY_32K	0x03		/* clock divided by 32k *//****************** ****************** *******************/#endif#ifndef ZFIRM_ID/* #include "zfwint.h" *//****************** ****************** *******************//* *	This file contains the definitions for interfacing with the *	Cyclom-Z ZFIRM Firmware. *//* General Constant definitions */#define	MAX_CHAN	64		/* max number of channels per board *//* firmware id structure (set after boot) */#define ID_ADDRESS	0x00000180L	/* signature/pointer address */#define	ZFIRM_ID	0x5557465AL	/* ZFIRM/U signature */#define	ZFIRM_HLT	0x59505B5CL	/* ZFIRM needs external power supply */#define	ZFIRM_RST	0x56040674L	/* RST signal (due to FW reset) */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -