/* $Id: boardergo.h,v 1.2.6.1 2001/09/23 22:24:54 kai Exp $1*2* Linux driver for HYSDN cards, definitions for ergo type boards (buffers..).3*4* Author Werner Cornelius ([email protected]) for Hypercope GmbH5* Copyright 1999 by Werner Cornelius ([email protected])6*7* This software may be used and distributed according to the terms8* of the GNU General Public License, incorporated herein by reference.9*10*/111213/************************************************/14/* defines for the dual port memory of the card */15/************************************************/16#define ERG_DPRAM_PAGE_SIZE 0x2000 /* DPRAM occupies a 8K page */17#define BOOT_IMG_SIZE 409618#define ERG_DPRAM_FILL_SIZE (ERG_DPRAM_PAGE_SIZE - BOOT_IMG_SIZE)1920#define ERG_TO_HY_BUF_SIZE 0x0E00 /* 3072 bytes buffer size to card */21#define ERG_TO_PC_BUF_SIZE 0x0E00 /* 3072 bytes to PC, too */2223/* following DPRAM layout copied from OS2-driver boarderg.h */24typedef struct ErgDpram_tag {25/*0000 */ unsigned char ToHyBuf[ERG_TO_HY_BUF_SIZE];26/*0E00 */ unsigned char ToPcBuf[ERG_TO_PC_BUF_SIZE];2728/*1C00 */ unsigned char bSoftUart[SIZE_RSV_SOFT_UART];29/* size 0x1B0 */3031/*1DB0 *//* tErrLogEntry */ unsigned char volatile ErrLogMsg[64];32/* size 64 bytes */33/*1DB0 unsigned long ulErrType; */34/*1DB4 unsigned long ulErrSubtype; */35/*1DB8 unsigned long ucTextSize; */36/*1DB9 unsigned long ucText[ERRLOG_TEXT_SIZE]; *//* ASCIIZ of len ucTextSize-1 */37/*1DF0 */3839/*1DF0 */ unsigned short volatile ToHyChannel;40/*1DF2 */ unsigned short volatile ToHySize;41/*1DF4 */ unsigned char volatile ToHyFlag;42/* !=0: msg for Hy waiting */43/*1DF5 */ unsigned char volatile ToPcFlag;44/* !=0: msg for PC waiting */45/*1DF6 */ unsigned short volatile ToPcChannel;46/*1DF8 */ unsigned short volatile ToPcSize;47/*1DFA */ unsigned char bRes1DBA[0x1E00 - 0x1DFA];48/* 6 bytes */4950/*1E00 */ unsigned char bRestOfEntryTbl[0x1F00 - 0x1E00];51/*1F00 */ unsigned long TrapTable[62];52/*1FF8 */ unsigned char bRes1FF8[0x1FFB - 0x1FF8];53/* low part of reset vetor */54/*1FFB */ unsigned char ToPcIntMetro;55/* notes:56* - metro has 32-bit boot ram - accessing57* ToPcInt and ToHyInt would be the same;58* so we moved ToPcInt to 1FFB.59* Because on the PC side both vars are60* readonly (reseting on int from E1 to PC),61* we can read both vars on both cards62* without destroying anything.63* - 1FFB is the high byte of the reset vector,64* so E1 side should NOT change this byte65* when writing!66*/67/*1FFC */ unsigned char volatile ToHyNoDpramErrLog;68/* note: ToHyNoDpramErrLog is used to inform69* boot loader, not to use DPRAM based70* ErrLog; when DOS driver is rewritten71* this becomes obsolete72*/73/*1FFD */ unsigned char bRes1FFD;74/*1FFE */ unsigned char ToPcInt;75/* E1_intclear; on CHAMP2: E1_intset */76/*1FFF */ unsigned char ToHyInt;77/* E1_intset; on CHAMP2: E1_intclear */78} tErgDpram;7980/**********************************************/81/* PCI9050 controller local register offsets: */82/* copied from boarderg.c */83/**********************************************/84#define PCI9050_INTR_REG 0x4C /* Interrupt register */85#define PCI9050_USER_IO 0x51 /* User I/O register */8687/* bitmask for PCI9050_INTR_REG: */88#define PCI9050_INTR_REG_EN1 0x01 /* 1= enable (def.), 0= disable */89#define PCI9050_INTR_REG_POL1 0x02 /* 1= active high (def.), 0= active low */90#define PCI9050_INTR_REG_STAT1 0x04 /* 1= intr. active, 0= intr. not active (def.) */91#define PCI9050_INTR_REG_ENPCI 0x40 /* 1= PCI interrupts enable (def.) */9293/* bitmask for PCI9050_USER_IO: */94#define PCI9050_USER_IO_EN3 0x02 /* 1= disable , 0= enable (def.) */95#define PCI9050_USER_IO_DIR3 0x04 /* 1= output (def.), 0= input */96#define PCI9050_USER_IO_DAT3 0x08 /* 1= high (def.) , 0= low */9798#define PCI9050_E1_RESET ( PCI9050_USER_IO_DIR3) /* 0x04 */99#define PCI9050_E1_RUN (PCI9050_USER_IO_DAT3|PCI9050_USER_IO_DIR3) /* 0x0C */100101102