162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * Amiga Linux/m68k Ariadne Ethernet Driver 362306a36Sopenharmony_ci * 462306a36Sopenharmony_ci * © Copyright 1995 by Geert Uytterhoeven (geert@linux-m68k.org) 562306a36Sopenharmony_ci * Peter De Schrijver 662306a36Sopenharmony_ci * (Peter.DeSchrijver@linux.cc.kuleuven.ac.be) 762306a36Sopenharmony_ci * 862306a36Sopenharmony_ci * ---------------------------------------------------------------------------------- 962306a36Sopenharmony_ci * 1062306a36Sopenharmony_ci * This program is based on 1162306a36Sopenharmony_ci * 1262306a36Sopenharmony_ci * lance.c: An AMD LANCE ethernet driver for linux. 1362306a36Sopenharmony_ci * Written 1993-94 by Donald Becker. 1462306a36Sopenharmony_ci * 1562306a36Sopenharmony_ci * Am79C960: PCnet(tm)-ISA Single-Chip Ethernet Controller 1662306a36Sopenharmony_ci * Advanced Micro Devices 1762306a36Sopenharmony_ci * Publication #16907, Rev. B, Amendment/0, May 1994 1862306a36Sopenharmony_ci * 1962306a36Sopenharmony_ci * MC68230: Parallel Interface/Timer (PI/T) 2062306a36Sopenharmony_ci * Motorola Semiconductors, December, 1983 2162306a36Sopenharmony_ci * 2262306a36Sopenharmony_ci * ---------------------------------------------------------------------------------- 2362306a36Sopenharmony_ci * 2462306a36Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public 2562306a36Sopenharmony_ci * License. See the file COPYING in the main directory of the Linux 2662306a36Sopenharmony_ci * distribution for more details. 2762306a36Sopenharmony_ci * 2862306a36Sopenharmony_ci * ---------------------------------------------------------------------------------- 2962306a36Sopenharmony_ci * 3062306a36Sopenharmony_ci * The Ariadne is a Zorro-II board made by Village Tronic. It contains: 3162306a36Sopenharmony_ci * 3262306a36Sopenharmony_ci * - an Am79C960 PCnet-ISA Single-Chip Ethernet Controller with both 3362306a36Sopenharmony_ci * 10BASE-2 (thin coax) and 10BASE-T (UTP) connectors 3462306a36Sopenharmony_ci * 3562306a36Sopenharmony_ci * - an MC68230 Parallel Interface/Timer configured as 2 parallel ports 3662306a36Sopenharmony_ci */ 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_ci 3962306a36Sopenharmony_ci /* 4062306a36Sopenharmony_ci * Am79C960 PCnet-ISA 4162306a36Sopenharmony_ci */ 4262306a36Sopenharmony_ci 4362306a36Sopenharmony_cistruct Am79C960 { 4462306a36Sopenharmony_ci volatile u_short AddressPROM[8]; 4562306a36Sopenharmony_ci /* IEEE Address PROM (Unused in the Ariadne) */ 4662306a36Sopenharmony_ci volatile u_short RDP; /* Register Data Port */ 4762306a36Sopenharmony_ci volatile u_short RAP; /* Register Address Port */ 4862306a36Sopenharmony_ci volatile u_short Reset; /* Reset Chip on Read Access */ 4962306a36Sopenharmony_ci volatile u_short IDP; /* ISACSR Data Port */ 5062306a36Sopenharmony_ci}; 5162306a36Sopenharmony_ci 5262306a36Sopenharmony_ci 5362306a36Sopenharmony_ci /* 5462306a36Sopenharmony_ci * Am79C960 Control and Status Registers 5562306a36Sopenharmony_ci * 5662306a36Sopenharmony_ci * These values are already swap()ed!! 5762306a36Sopenharmony_ci * 5862306a36Sopenharmony_ci * Only registers marked with a `-' are intended for network software 5962306a36Sopenharmony_ci * access 6062306a36Sopenharmony_ci */ 6162306a36Sopenharmony_ci 6262306a36Sopenharmony_ci#define CSR0 0x0000 /* - PCnet-ISA Controller Status */ 6362306a36Sopenharmony_ci#define CSR1 0x0100 /* - IADR[15:0] */ 6462306a36Sopenharmony_ci#define CSR2 0x0200 /* - IADR[23:16] */ 6562306a36Sopenharmony_ci#define CSR3 0x0300 /* - Interrupt Masks and Deferral Control */ 6662306a36Sopenharmony_ci#define CSR4 0x0400 /* - Test and Features Control */ 6762306a36Sopenharmony_ci#define CSR6 0x0600 /* RCV/XMT Descriptor Table Length */ 6862306a36Sopenharmony_ci#define CSR8 0x0800 /* - Logical Address Filter, LADRF[15:0] */ 6962306a36Sopenharmony_ci#define CSR9 0x0900 /* - Logical Address Filter, LADRF[31:16] */ 7062306a36Sopenharmony_ci#define CSR10 0x0a00 /* - Logical Address Filter, LADRF[47:32] */ 7162306a36Sopenharmony_ci#define CSR11 0x0b00 /* - Logical Address Filter, LADRF[63:48] */ 7262306a36Sopenharmony_ci#define CSR12 0x0c00 /* - Physical Address Register, PADR[15:0] */ 7362306a36Sopenharmony_ci#define CSR13 0x0d00 /* - Physical Address Register, PADR[31:16] */ 7462306a36Sopenharmony_ci#define CSR14 0x0e00 /* - Physical Address Register, PADR[47:32] */ 7562306a36Sopenharmony_ci#define CSR15 0x0f00 /* - Mode Register */ 7662306a36Sopenharmony_ci#define CSR16 0x1000 /* Initialization Block Address Lower */ 7762306a36Sopenharmony_ci#define CSR17 0x1100 /* Initialization Block Address Upper */ 7862306a36Sopenharmony_ci#define CSR18 0x1200 /* Current Receive Buffer Address */ 7962306a36Sopenharmony_ci#define CSR19 0x1300 /* Current Receive Buffer Address */ 8062306a36Sopenharmony_ci#define CSR20 0x1400 /* Current Transmit Buffer Address */ 8162306a36Sopenharmony_ci#define CSR21 0x1500 /* Current Transmit Buffer Address */ 8262306a36Sopenharmony_ci#define CSR22 0x1600 /* Next Receive Buffer Address */ 8362306a36Sopenharmony_ci#define CSR23 0x1700 /* Next Receive Buffer Address */ 8462306a36Sopenharmony_ci#define CSR24 0x1800 /* - Base Address of Receive Ring */ 8562306a36Sopenharmony_ci#define CSR25 0x1900 /* - Base Address of Receive Ring */ 8662306a36Sopenharmony_ci#define CSR26 0x1a00 /* Next Receive Descriptor Address */ 8762306a36Sopenharmony_ci#define CSR27 0x1b00 /* Next Receive Descriptor Address */ 8862306a36Sopenharmony_ci#define CSR28 0x1c00 /* Current Receive Descriptor Address */ 8962306a36Sopenharmony_ci#define CSR29 0x1d00 /* Current Receive Descriptor Address */ 9062306a36Sopenharmony_ci#define CSR30 0x1e00 /* - Base Address of Transmit Ring */ 9162306a36Sopenharmony_ci#define CSR31 0x1f00 /* - Base Address of transmit Ring */ 9262306a36Sopenharmony_ci#define CSR32 0x2000 /* Next Transmit Descriptor Address */ 9362306a36Sopenharmony_ci#define CSR33 0x2100 /* Next Transmit Descriptor Address */ 9462306a36Sopenharmony_ci#define CSR34 0x2200 /* Current Transmit Descriptor Address */ 9562306a36Sopenharmony_ci#define CSR35 0x2300 /* Current Transmit Descriptor Address */ 9662306a36Sopenharmony_ci#define CSR36 0x2400 /* Next Next Receive Descriptor Address */ 9762306a36Sopenharmony_ci#define CSR37 0x2500 /* Next Next Receive Descriptor Address */ 9862306a36Sopenharmony_ci#define CSR38 0x2600 /* Next Next Transmit Descriptor Address */ 9962306a36Sopenharmony_ci#define CSR39 0x2700 /* Next Next Transmit Descriptor Address */ 10062306a36Sopenharmony_ci#define CSR40 0x2800 /* Current Receive Status and Byte Count */ 10162306a36Sopenharmony_ci#define CSR41 0x2900 /* Current Receive Status and Byte Count */ 10262306a36Sopenharmony_ci#define CSR42 0x2a00 /* Current Transmit Status and Byte Count */ 10362306a36Sopenharmony_ci#define CSR43 0x2b00 /* Current Transmit Status and Byte Count */ 10462306a36Sopenharmony_ci#define CSR44 0x2c00 /* Next Receive Status and Byte Count */ 10562306a36Sopenharmony_ci#define CSR45 0x2d00 /* Next Receive Status and Byte Count */ 10662306a36Sopenharmony_ci#define CSR46 0x2e00 /* Poll Time Counter */ 10762306a36Sopenharmony_ci#define CSR47 0x2f00 /* Polling Interval */ 10862306a36Sopenharmony_ci#define CSR48 0x3000 /* Temporary Storage */ 10962306a36Sopenharmony_ci#define CSR49 0x3100 /* Temporary Storage */ 11062306a36Sopenharmony_ci#define CSR50 0x3200 /* Temporary Storage */ 11162306a36Sopenharmony_ci#define CSR51 0x3300 /* Temporary Storage */ 11262306a36Sopenharmony_ci#define CSR52 0x3400 /* Temporary Storage */ 11362306a36Sopenharmony_ci#define CSR53 0x3500 /* Temporary Storage */ 11462306a36Sopenharmony_ci#define CSR54 0x3600 /* Temporary Storage */ 11562306a36Sopenharmony_ci#define CSR55 0x3700 /* Temporary Storage */ 11662306a36Sopenharmony_ci#define CSR56 0x3800 /* Temporary Storage */ 11762306a36Sopenharmony_ci#define CSR57 0x3900 /* Temporary Storage */ 11862306a36Sopenharmony_ci#define CSR58 0x3a00 /* Temporary Storage */ 11962306a36Sopenharmony_ci#define CSR59 0x3b00 /* Temporary Storage */ 12062306a36Sopenharmony_ci#define CSR60 0x3c00 /* Previous Transmit Descriptor Address */ 12162306a36Sopenharmony_ci#define CSR61 0x3d00 /* Previous Transmit Descriptor Address */ 12262306a36Sopenharmony_ci#define CSR62 0x3e00 /* Previous Transmit Status and Byte Count */ 12362306a36Sopenharmony_ci#define CSR63 0x3f00 /* Previous Transmit Status and Byte Count */ 12462306a36Sopenharmony_ci#define CSR64 0x4000 /* Next Transmit Buffer Address */ 12562306a36Sopenharmony_ci#define CSR65 0x4100 /* Next Transmit Buffer Address */ 12662306a36Sopenharmony_ci#define CSR66 0x4200 /* Next Transmit Status and Byte Count */ 12762306a36Sopenharmony_ci#define CSR67 0x4300 /* Next Transmit Status and Byte Count */ 12862306a36Sopenharmony_ci#define CSR68 0x4400 /* Transmit Status Temporary Storage */ 12962306a36Sopenharmony_ci#define CSR69 0x4500 /* Transmit Status Temporary Storage */ 13062306a36Sopenharmony_ci#define CSR70 0x4600 /* Temporary Storage */ 13162306a36Sopenharmony_ci#define CSR71 0x4700 /* Temporary Storage */ 13262306a36Sopenharmony_ci#define CSR72 0x4800 /* Receive Ring Counter */ 13362306a36Sopenharmony_ci#define CSR74 0x4a00 /* Transmit Ring Counter */ 13462306a36Sopenharmony_ci#define CSR76 0x4c00 /* - Receive Ring Length */ 13562306a36Sopenharmony_ci#define CSR78 0x4e00 /* - Transmit Ring Length */ 13662306a36Sopenharmony_ci#define CSR80 0x5000 /* - Burst and FIFO Threshold Control */ 13762306a36Sopenharmony_ci#define CSR82 0x5200 /* - Bus Activity Timer */ 13862306a36Sopenharmony_ci#define CSR84 0x5400 /* DMA Address */ 13962306a36Sopenharmony_ci#define CSR85 0x5500 /* DMA Address */ 14062306a36Sopenharmony_ci#define CSR86 0x5600 /* Buffer Byte Counter */ 14162306a36Sopenharmony_ci#define CSR88 0x5800 /* - Chip ID */ 14262306a36Sopenharmony_ci#define CSR89 0x5900 /* - Chip ID */ 14362306a36Sopenharmony_ci#define CSR92 0x5c00 /* Ring Length Conversion */ 14462306a36Sopenharmony_ci#define CSR94 0x5e00 /* Transmit Time Domain Reflectometry Count */ 14562306a36Sopenharmony_ci#define CSR96 0x6000 /* Bus Interface Scratch Register 0 */ 14662306a36Sopenharmony_ci#define CSR97 0x6100 /* Bus Interface Scratch Register 0 */ 14762306a36Sopenharmony_ci#define CSR98 0x6200 /* Bus Interface Scratch Register 1 */ 14862306a36Sopenharmony_ci#define CSR99 0x6300 /* Bus Interface Scratch Register 1 */ 14962306a36Sopenharmony_ci#define CSR104 0x6800 /* SWAP */ 15062306a36Sopenharmony_ci#define CSR105 0x6900 /* SWAP */ 15162306a36Sopenharmony_ci#define CSR108 0x6c00 /* Buffer Management Scratch */ 15262306a36Sopenharmony_ci#define CSR109 0x6d00 /* Buffer Management Scratch */ 15362306a36Sopenharmony_ci#define CSR112 0x7000 /* - Missed Frame Count */ 15462306a36Sopenharmony_ci#define CSR114 0x7200 /* - Receive Collision Count */ 15562306a36Sopenharmony_ci#define CSR124 0x7c00 /* - Buffer Management Unit Test */ 15662306a36Sopenharmony_ci 15762306a36Sopenharmony_ci 15862306a36Sopenharmony_ci /* 15962306a36Sopenharmony_ci * Am79C960 ISA Control and Status Registers 16062306a36Sopenharmony_ci * 16162306a36Sopenharmony_ci * These values are already swap()ed!! 16262306a36Sopenharmony_ci */ 16362306a36Sopenharmony_ci 16462306a36Sopenharmony_ci#define ISACSR0 0x0000 /* Master Mode Read Active */ 16562306a36Sopenharmony_ci#define ISACSR1 0x0100 /* Master Mode Write Active */ 16662306a36Sopenharmony_ci#define ISACSR2 0x0200 /* Miscellaneous Configuration */ 16762306a36Sopenharmony_ci#define ISACSR4 0x0400 /* LED0 Status (Link Integrity) */ 16862306a36Sopenharmony_ci#define ISACSR5 0x0500 /* LED1 Status */ 16962306a36Sopenharmony_ci#define ISACSR6 0x0600 /* LED2 Status */ 17062306a36Sopenharmony_ci#define ISACSR7 0x0700 /* LED3 Status */ 17162306a36Sopenharmony_ci 17262306a36Sopenharmony_ci 17362306a36Sopenharmony_ci /* 17462306a36Sopenharmony_ci * Bit definitions for CSR0 (PCnet-ISA Controller Status) 17562306a36Sopenharmony_ci * 17662306a36Sopenharmony_ci * These values are already swap()ed!! 17762306a36Sopenharmony_ci */ 17862306a36Sopenharmony_ci 17962306a36Sopenharmony_ci#define ERR 0x0080 /* Error */ 18062306a36Sopenharmony_ci#define BABL 0x0040 /* Babble: Transmitted too many bits */ 18162306a36Sopenharmony_ci#define CERR 0x0020 /* No Heartbeat (10BASE-T) */ 18262306a36Sopenharmony_ci#define MISS 0x0010 /* Missed Frame */ 18362306a36Sopenharmony_ci#define MERR 0x0008 /* Memory Error */ 18462306a36Sopenharmony_ci#define RINT 0x0004 /* Receive Interrupt */ 18562306a36Sopenharmony_ci#define TINT 0x0002 /* Transmit Interrupt */ 18662306a36Sopenharmony_ci#define IDON 0x0001 /* Initialization Done */ 18762306a36Sopenharmony_ci#define INTR 0x8000 /* Interrupt Flag */ 18862306a36Sopenharmony_ci#define INEA 0x4000 /* Interrupt Enable */ 18962306a36Sopenharmony_ci#define RXON 0x2000 /* Receive On */ 19062306a36Sopenharmony_ci#define TXON 0x1000 /* Transmit On */ 19162306a36Sopenharmony_ci#define TDMD 0x0800 /* Transmit Demand */ 19262306a36Sopenharmony_ci#define STOP 0x0400 /* Stop */ 19362306a36Sopenharmony_ci#define STRT 0x0200 /* Start */ 19462306a36Sopenharmony_ci#define INIT 0x0100 /* Initialize */ 19562306a36Sopenharmony_ci 19662306a36Sopenharmony_ci 19762306a36Sopenharmony_ci /* 19862306a36Sopenharmony_ci * Bit definitions for CSR3 (Interrupt Masks and Deferral Control) 19962306a36Sopenharmony_ci * 20062306a36Sopenharmony_ci * These values are already swap()ed!! 20162306a36Sopenharmony_ci */ 20262306a36Sopenharmony_ci 20362306a36Sopenharmony_ci#define BABLM 0x0040 /* Babble Mask */ 20462306a36Sopenharmony_ci#define MISSM 0x0010 /* Missed Frame Mask */ 20562306a36Sopenharmony_ci#define MERRM 0x0008 /* Memory Error Mask */ 20662306a36Sopenharmony_ci#define RINTM 0x0004 /* Receive Interrupt Mask */ 20762306a36Sopenharmony_ci#define TINTM 0x0002 /* Transmit Interrupt Mask */ 20862306a36Sopenharmony_ci#define IDONM 0x0001 /* Initialization Done Mask */ 20962306a36Sopenharmony_ci#define DXMT2PD 0x1000 /* Disable Transmit Two Part Deferral */ 21062306a36Sopenharmony_ci#define EMBA 0x0800 /* Enable Modified Back-off Algorithm */ 21162306a36Sopenharmony_ci 21262306a36Sopenharmony_ci 21362306a36Sopenharmony_ci /* 21462306a36Sopenharmony_ci * Bit definitions for CSR4 (Test and Features Control) 21562306a36Sopenharmony_ci * 21662306a36Sopenharmony_ci * These values are already swap()ed!! 21762306a36Sopenharmony_ci */ 21862306a36Sopenharmony_ci 21962306a36Sopenharmony_ci#define ENTST 0x0080 /* Enable Test Mode */ 22062306a36Sopenharmony_ci#define DMAPLUS 0x0040 /* Disable Burst Transaction Counter */ 22162306a36Sopenharmony_ci#define TIMER 0x0020 /* Timer Enable Register */ 22262306a36Sopenharmony_ci#define DPOLL 0x0010 /* Disable Transmit Polling */ 22362306a36Sopenharmony_ci#define APAD_XMT 0x0008 /* Auto Pad Transmit */ 22462306a36Sopenharmony_ci#define ASTRP_RCV 0x0004 /* Auto Pad Stripping */ 22562306a36Sopenharmony_ci#define MFCO 0x0002 /* Missed Frame Counter Overflow Interrupt */ 22662306a36Sopenharmony_ci#define MFCOM 0x0001 /* Missed Frame Counter Overflow Mask */ 22762306a36Sopenharmony_ci#define RCVCCO 0x2000 /* Receive Collision Counter Overflow Interrupt */ 22862306a36Sopenharmony_ci#define RCVCCOM 0x1000 /* Receive Collision Counter Overflow Mask */ 22962306a36Sopenharmony_ci#define TXSTRT 0x0800 /* Transmit Start Status */ 23062306a36Sopenharmony_ci#define TXSTRTM 0x0400 /* Transmit Start Mask */ 23162306a36Sopenharmony_ci#define JAB 0x0200 /* Jabber Error */ 23262306a36Sopenharmony_ci#define JABM 0x0100 /* Jabber Error Mask */ 23362306a36Sopenharmony_ci 23462306a36Sopenharmony_ci 23562306a36Sopenharmony_ci /* 23662306a36Sopenharmony_ci * Bit definitions for CSR15 (Mode Register) 23762306a36Sopenharmony_ci * 23862306a36Sopenharmony_ci * These values are already swap()ed!! 23962306a36Sopenharmony_ci */ 24062306a36Sopenharmony_ci 24162306a36Sopenharmony_ci#define PROM 0x0080 /* Promiscuous Mode */ 24262306a36Sopenharmony_ci#define DRCVBC 0x0040 /* Disable Receive Broadcast */ 24362306a36Sopenharmony_ci#define DRCVPA 0x0020 /* Disable Receive Physical Address */ 24462306a36Sopenharmony_ci#define DLNKTST 0x0010 /* Disable Link Status */ 24562306a36Sopenharmony_ci#define DAPC 0x0008 /* Disable Automatic Polarity Correction */ 24662306a36Sopenharmony_ci#define MENDECL 0x0004 /* MENDEC Loopback Mode */ 24762306a36Sopenharmony_ci#define LRTTSEL 0x0002 /* Low Receive Threshold/Transmit Mode Select */ 24862306a36Sopenharmony_ci#define PORTSEL1 0x0001 /* Port Select Bits */ 24962306a36Sopenharmony_ci#define PORTSEL2 0x8000 /* Port Select Bits */ 25062306a36Sopenharmony_ci#define INTL 0x4000 /* Internal Loopback */ 25162306a36Sopenharmony_ci#define DRTY 0x2000 /* Disable Retry */ 25262306a36Sopenharmony_ci#define FCOLL 0x1000 /* Force Collision */ 25362306a36Sopenharmony_ci#define DXMTFCS 0x0800 /* Disable Transmit CRC */ 25462306a36Sopenharmony_ci#define LOOP 0x0400 /* Loopback Enable */ 25562306a36Sopenharmony_ci#define DTX 0x0200 /* Disable Transmitter */ 25662306a36Sopenharmony_ci#define DRX 0x0100 /* Disable Receiver */ 25762306a36Sopenharmony_ci 25862306a36Sopenharmony_ci 25962306a36Sopenharmony_ci /* 26062306a36Sopenharmony_ci * Bit definitions for ISACSR2 (Miscellaneous Configuration) 26162306a36Sopenharmony_ci * 26262306a36Sopenharmony_ci * These values are already swap()ed!! 26362306a36Sopenharmony_ci */ 26462306a36Sopenharmony_ci 26562306a36Sopenharmony_ci#define ASEL 0x0200 /* Media Interface Port Auto Select */ 26662306a36Sopenharmony_ci 26762306a36Sopenharmony_ci 26862306a36Sopenharmony_ci /* 26962306a36Sopenharmony_ci * Bit definitions for ISACSR5-7 (LED1-3 Status) 27062306a36Sopenharmony_ci * 27162306a36Sopenharmony_ci * These values are already swap()ed!! 27262306a36Sopenharmony_ci */ 27362306a36Sopenharmony_ci 27462306a36Sopenharmony_ci#define LEDOUT 0x0080 /* Current LED Status */ 27562306a36Sopenharmony_ci#define PSE 0x8000 /* Pulse Stretcher Enable */ 27662306a36Sopenharmony_ci#define XMTE 0x1000 /* Enable Transmit Status Signal */ 27762306a36Sopenharmony_ci#define RVPOLE 0x0800 /* Enable Receive Polarity Signal */ 27862306a36Sopenharmony_ci#define RCVE 0x0400 /* Enable Receive Status Signal */ 27962306a36Sopenharmony_ci#define JABE 0x0200 /* Enable Jabber Signal */ 28062306a36Sopenharmony_ci#define COLE 0x0100 /* Enable Collision Signal */ 28162306a36Sopenharmony_ci 28262306a36Sopenharmony_ci 28362306a36Sopenharmony_ci /* 28462306a36Sopenharmony_ci * Receive Descriptor Ring Entry 28562306a36Sopenharmony_ci */ 28662306a36Sopenharmony_ci 28762306a36Sopenharmony_cistruct RDRE { 28862306a36Sopenharmony_ci volatile u_short RMD0; /* LADR[15:0] */ 28962306a36Sopenharmony_ci volatile u_short RMD1; /* HADR[23:16] | Receive Flags */ 29062306a36Sopenharmony_ci volatile u_short RMD2; /* Buffer Byte Count (two's complement) */ 29162306a36Sopenharmony_ci volatile u_short RMD3; /* Message Byte Count */ 29262306a36Sopenharmony_ci}; 29362306a36Sopenharmony_ci 29462306a36Sopenharmony_ci 29562306a36Sopenharmony_ci /* 29662306a36Sopenharmony_ci * Transmit Descriptor Ring Entry 29762306a36Sopenharmony_ci */ 29862306a36Sopenharmony_ci 29962306a36Sopenharmony_cistruct TDRE { 30062306a36Sopenharmony_ci volatile u_short TMD0; /* LADR[15:0] */ 30162306a36Sopenharmony_ci volatile u_short TMD1; /* HADR[23:16] | Transmit Flags */ 30262306a36Sopenharmony_ci volatile u_short TMD2; /* Buffer Byte Count (two's complement) */ 30362306a36Sopenharmony_ci volatile u_short TMD3; /* Error Flags */ 30462306a36Sopenharmony_ci}; 30562306a36Sopenharmony_ci 30662306a36Sopenharmony_ci 30762306a36Sopenharmony_ci /* 30862306a36Sopenharmony_ci * Receive Flags 30962306a36Sopenharmony_ci */ 31062306a36Sopenharmony_ci 31162306a36Sopenharmony_ci#define RF_OWN 0x0080 /* PCnet-ISA controller owns the descriptor */ 31262306a36Sopenharmony_ci#define RF_ERR 0x0040 /* Error */ 31362306a36Sopenharmony_ci#define RF_FRAM 0x0020 /* Framing Error */ 31462306a36Sopenharmony_ci#define RF_OFLO 0x0010 /* Overflow Error */ 31562306a36Sopenharmony_ci#define RF_CRC 0x0008 /* CRC Error */ 31662306a36Sopenharmony_ci#define RF_BUFF 0x0004 /* Buffer Error */ 31762306a36Sopenharmony_ci#define RF_STP 0x0002 /* Start of Packet */ 31862306a36Sopenharmony_ci#define RF_ENP 0x0001 /* End of Packet */ 31962306a36Sopenharmony_ci 32062306a36Sopenharmony_ci 32162306a36Sopenharmony_ci /* 32262306a36Sopenharmony_ci * Transmit Flags 32362306a36Sopenharmony_ci */ 32462306a36Sopenharmony_ci 32562306a36Sopenharmony_ci#define TF_OWN 0x0080 /* PCnet-ISA controller owns the descriptor */ 32662306a36Sopenharmony_ci#define TF_ERR 0x0040 /* Error */ 32762306a36Sopenharmony_ci#define TF_ADD_FCS 0x0020 /* Controls FCS Generation */ 32862306a36Sopenharmony_ci#define TF_MORE 0x0010 /* More than one retry needed */ 32962306a36Sopenharmony_ci#define TF_ONE 0x0008 /* One retry needed */ 33062306a36Sopenharmony_ci#define TF_DEF 0x0004 /* Deferred */ 33162306a36Sopenharmony_ci#define TF_STP 0x0002 /* Start of Packet */ 33262306a36Sopenharmony_ci#define TF_ENP 0x0001 /* End of Packet */ 33362306a36Sopenharmony_ci 33462306a36Sopenharmony_ci 33562306a36Sopenharmony_ci /* 33662306a36Sopenharmony_ci * Error Flags 33762306a36Sopenharmony_ci */ 33862306a36Sopenharmony_ci 33962306a36Sopenharmony_ci#define EF_BUFF 0x0080 /* Buffer Error */ 34062306a36Sopenharmony_ci#define EF_UFLO 0x0040 /* Underflow Error */ 34162306a36Sopenharmony_ci#define EF_LCOL 0x0010 /* Late Collision */ 34262306a36Sopenharmony_ci#define EF_LCAR 0x0008 /* Loss of Carrier */ 34362306a36Sopenharmony_ci#define EF_RTRY 0x0004 /* Retry Error */ 34462306a36Sopenharmony_ci#define EF_TDR 0xff03 /* Time Domain Reflectometry */ 34562306a36Sopenharmony_ci 34662306a36Sopenharmony_ci 34762306a36Sopenharmony_ci 34862306a36Sopenharmony_ci /* 34962306a36Sopenharmony_ci * MC68230 Parallel Interface/Timer 35062306a36Sopenharmony_ci */ 35162306a36Sopenharmony_ci 35262306a36Sopenharmony_cistruct MC68230 { 35362306a36Sopenharmony_ci volatile u_char PGCR; /* Port General Control Register */ 35462306a36Sopenharmony_ci u_char Pad1[1]; 35562306a36Sopenharmony_ci volatile u_char PSRR; /* Port Service Request Register */ 35662306a36Sopenharmony_ci u_char Pad2[1]; 35762306a36Sopenharmony_ci volatile u_char PADDR; /* Port A Data Direction Register */ 35862306a36Sopenharmony_ci u_char Pad3[1]; 35962306a36Sopenharmony_ci volatile u_char PBDDR; /* Port B Data Direction Register */ 36062306a36Sopenharmony_ci u_char Pad4[1]; 36162306a36Sopenharmony_ci volatile u_char PCDDR; /* Port C Data Direction Register */ 36262306a36Sopenharmony_ci u_char Pad5[1]; 36362306a36Sopenharmony_ci volatile u_char PIVR; /* Port Interrupt Vector Register */ 36462306a36Sopenharmony_ci u_char Pad6[1]; 36562306a36Sopenharmony_ci volatile u_char PACR; /* Port A Control Register */ 36662306a36Sopenharmony_ci u_char Pad7[1]; 36762306a36Sopenharmony_ci volatile u_char PBCR; /* Port B Control Register */ 36862306a36Sopenharmony_ci u_char Pad8[1]; 36962306a36Sopenharmony_ci volatile u_char PADR; /* Port A Data Register */ 37062306a36Sopenharmony_ci u_char Pad9[1]; 37162306a36Sopenharmony_ci volatile u_char PBDR; /* Port B Data Register */ 37262306a36Sopenharmony_ci u_char Pad10[1]; 37362306a36Sopenharmony_ci volatile u_char PAAR; /* Port A Alternate Register */ 37462306a36Sopenharmony_ci u_char Pad11[1]; 37562306a36Sopenharmony_ci volatile u_char PBAR; /* Port B Alternate Register */ 37662306a36Sopenharmony_ci u_char Pad12[1]; 37762306a36Sopenharmony_ci volatile u_char PCDR; /* Port C Data Register */ 37862306a36Sopenharmony_ci u_char Pad13[1]; 37962306a36Sopenharmony_ci volatile u_char PSR; /* Port Status Register */ 38062306a36Sopenharmony_ci u_char Pad14[5]; 38162306a36Sopenharmony_ci volatile u_char TCR; /* Timer Control Register */ 38262306a36Sopenharmony_ci u_char Pad15[1]; 38362306a36Sopenharmony_ci volatile u_char TIVR; /* Timer Interrupt Vector Register */ 38462306a36Sopenharmony_ci u_char Pad16[3]; 38562306a36Sopenharmony_ci volatile u_char CPRH; /* Counter Preload Register (High) */ 38662306a36Sopenharmony_ci u_char Pad17[1]; 38762306a36Sopenharmony_ci volatile u_char CPRM; /* Counter Preload Register (Mid) */ 38862306a36Sopenharmony_ci u_char Pad18[1]; 38962306a36Sopenharmony_ci volatile u_char CPRL; /* Counter Preload Register (Low) */ 39062306a36Sopenharmony_ci u_char Pad19[3]; 39162306a36Sopenharmony_ci volatile u_char CNTRH; /* Count Register (High) */ 39262306a36Sopenharmony_ci u_char Pad20[1]; 39362306a36Sopenharmony_ci volatile u_char CNTRM; /* Count Register (Mid) */ 39462306a36Sopenharmony_ci u_char Pad21[1]; 39562306a36Sopenharmony_ci volatile u_char CNTRL; /* Count Register (Low) */ 39662306a36Sopenharmony_ci u_char Pad22[1]; 39762306a36Sopenharmony_ci volatile u_char TSR; /* Timer Status Register */ 39862306a36Sopenharmony_ci u_char Pad23[11]; 39962306a36Sopenharmony_ci}; 40062306a36Sopenharmony_ci 40162306a36Sopenharmony_ci 40262306a36Sopenharmony_ci /* 40362306a36Sopenharmony_ci * Ariadne Expansion Board Structure 40462306a36Sopenharmony_ci */ 40562306a36Sopenharmony_ci 40662306a36Sopenharmony_ci#define ARIADNE_LANCE 0x360 40762306a36Sopenharmony_ci 40862306a36Sopenharmony_ci#define ARIADNE_PIT 0x1000 40962306a36Sopenharmony_ci 41062306a36Sopenharmony_ci#define ARIADNE_BOOTPROM 0x4000 /* I guess it's here :-) */ 41162306a36Sopenharmony_ci#define ARIADNE_BOOTPROM_SIZE 0x4000 41262306a36Sopenharmony_ci 41362306a36Sopenharmony_ci#define ARIADNE_RAM 0x8000 /* Always access WORDs!! */ 41462306a36Sopenharmony_ci#define ARIADNE_RAM_SIZE 0x8000 41562306a36Sopenharmony_ci 416