Path: blob/master/drivers/isdn/act2000/act2000_isa.h
17531 views
/* $Id: act2000_isa.h,v 1.4.6.1 2001/09/23 22:24:32 kai Exp $1*2* ISDN lowlevel-module for the IBM ISDN-S0 Active 2000 (ISA-Version).3*4* Author Fritz Elfert5* Copyright by Fritz Elfert <[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* Thanks to Friedemann Baitinger and IBM Germany11*12*/1314#ifndef act2000_isa_h15#define act2000_isa_h1617#define ISA_POLL_LOOP 40 /* Try to read-write before give up */1819typedef enum {20INT_NO_CHANGE = 0, /* Do not change the Mask */21INT_ON = 1, /* Set to Enable */22INT_OFF = 2, /* Set to Disable */23} ISA_INT_T;2425/**************************************************************************/26/* Configuration Register COR (RW) */27/**************************************************************************/28/* 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 */29/* Soft Res| IRQM | IRQ Select | N/A | WAIT |Proc err */30/**************************************************************************/31#define ISA_COR 0 /* Offset for ISA config register */32#define ISA_COR_PERR 0x01 /* Processor Error Enabled */33#define ISA_COR_WS 0x02 /* Insert Wait State if 1 */34#define ISA_COR_IRQOFF 0x38 /* No Interrupt */35#define ISA_COR_IRQ07 0x30 /* IRQ 7 Enable */36#define ISA_COR_IRQ05 0x28 /* IRQ 5 Enable */37#define ISA_COR_IRQ03 0x20 /* IRQ 3 Enable */38#define ISA_COR_IRQ10 0x18 /* IRQ 10 Enable */39#define ISA_COR_IRQ11 0x10 /* IRQ 11 Enable */40#define ISA_COR_IRQ12 0x08 /* IRQ 12 Enable */41#define ISA_COR_IRQ15 0x00 /* IRQ 15 Enable */42#define ISA_COR_IRQPULSE 0x40 /* 0 = Level 1 = Pulse Interrupt */43#define ISA_COR_RESET 0x80 /* Soft Reset for Transputer */4445/**************************************************************************/46/* Interrupt Source Register ISR (RO) */47/**************************************************************************/48/* 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 */49/* N/A | N/A | N/A |Err sig |Ser ID |IN Intr |Out Intr| Error */50/**************************************************************************/51#define ISA_ISR 1 /* Offset for Interrupt Register */52#define ISA_ISR_ERR 0x01 /* Error Interrupt */53#define ISA_ISR_OUT 0x02 /* Output Interrupt */54#define ISA_ISR_INP 0x04 /* Input Interrupt */55#define ISA_ISR_SERIAL 0x08 /* Read out Serial ID after Reset */56#define ISA_ISR_ERRSIG 0x10 /* Error Signal Input */57#define ISA_ISR_ERR_MASK 0xfe /* Mask Error Interrupt */58#define ISA_ISR_OUT_MASK 0xfd /* Mask Output Interrupt */59#define ISA_ISR_INP_MASK 0xfb /* Mask Input Interrupt */6061/* Signature delivered after Reset at ISA_ISR_SERIAL (LSB first) */62#define ISA_SER_ID 0x0201 /* ID for ISA Card */6364/**************************************************************************/65/* EEPROM Register EPR (RW) */66/**************************************************************************/67/* 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 */68/* N/A | N/A | N/A |ROM Hold| ROM CS |ROM CLK | ROM IN |ROM Out */69/**************************************************************************/70#define ISA_EPR 2 /* Offset for this Register */71#define ISA_EPR_OUT 0x01 /* Rome Register Out (RO) */72#define ISA_EPR_IN 0x02 /* Rom Register In (WR) */73#define ISA_EPR_CLK 0x04 /* Rom Clock (WR) */74#define ISA_EPR_CS 0x08 /* Rom Cip Select (WR) */75#define ISA_EPR_HOLD 0x10 /* Rom Hold Signal (WR) */7677/**************************************************************************/78/* EEPROM enable Register EER (unused) */79/**************************************************************************/80#define ISA_EER 3 /* Offset for this Register */8182/**************************************************************************/83/* SLC Data Input SDI (RO) */84/**************************************************************************/85#define ISA_SDI 4 /* Offset for this Register */8687/**************************************************************************/88/* SLC Data Output SDO (WO) */89/**************************************************************************/90#define ISA_SDO 5 /* Offset for this Register */9192/**************************************************************************/93/* IMS C011 Mode 2 Input Status Register for INMOS CPU SIS (RW) */94/**************************************************************************/95/* 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 */96/* N/A | N/A | N/A | N/A | N/A | N/A |Int Ena |Data Pre */97/**************************************************************************/98#define ISA_SIS 6 /* Offset for this Register */99#define ISA_SIS_READY 0x01 /* If 1 : data is available */100#define ISA_SIS_INT 0x02 /* Enable Interrupt for READ */101102/**************************************************************************/103/* IMS C011 Mode 2 Output Status Register from INMOS CPU SOS (RW) */104/**************************************************************************/105/* 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 */106/* N/A | N/A | N/A | N/A | N/A | N/A |Int Ena |Out Rdy */107/**************************************************************************/108#define ISA_SOS 7 /* Offset for this Register */109#define ISA_SOS_READY 0x01 /* If 1 : we can write Data */110#define ISA_SOS_INT 0x02 /* Enable Interrupt for WRITE */111112#define ISA_REGION 8 /* Number of Registers */113114115/* Macros for accessing ports */116#define ISA_PORT_COR (card->port+ISA_COR)117#define ISA_PORT_ISR (card->port+ISA_ISR)118#define ISA_PORT_EPR (card->port+ISA_EPR)119#define ISA_PORT_EER (card->port+ISA_EER)120#define ISA_PORT_SDI (card->port+ISA_SDI)121#define ISA_PORT_SDO (card->port+ISA_SDO)122#define ISA_PORT_SIS (card->port+ISA_SIS)123#define ISA_PORT_SOS (card->port+ISA_SOS)124125/* Prototypes */126127extern int act2000_isa_detect(unsigned short portbase);128extern int act2000_isa_config_irq(act2000_card * card, short irq);129extern int act2000_isa_config_port(act2000_card * card, unsigned short portbase);130extern int act2000_isa_download(act2000_card * card, act2000_ddef __user * cb);131extern void act2000_isa_release(act2000_card * card);132extern void act2000_isa_receive(act2000_card *card);133extern void act2000_isa_send(act2000_card *card);134135#endif /* act2000_isa_h */136137138