Home | History | Annotate | Line # | Download | only in ic
smc90cx6reg.h revision 1.1
      1 /*
      2  * Copyright (c) 1994, 1995 Ignatios Souvatzis
      3  * All rights reserved.
      4  *
      5  * This software was written by Ignatios Souvatzis and contributed
      6  * to the University of California at Berkeley.
      7  *
      8  * Redistribution and use in source and binary forms, with or without
      9  * modification, are permitted provided that the following conditions
     10  * are met:
     11  * 1. Redistributions of source code must retain the above copyright
     12  *    notice, this list of conditions and the following disclaimer.
     13  * 2. Redistributions in binary form must reproduce the above copyright
     14  *    notice, this list of conditions and the following disclaimer in the
     15  *    documentation and/or other materials provided with the distribution.
     16  * 3. All advertising materials mentioning features or use of this software
     17  *    must display the following acknowledgement:
     18  *	This product includes software developed by the University of
     19  *	California, Berkeley and its contributors.
     20  * 4. Neither the name of the University nor the names of its contributors
     21  *    may be used to endorse or promote products derived from this software
     22  *    without specific prior written permission.
     23  *
     24  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     25  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     26  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     27  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     28  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     29  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     30  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     31  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     32  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     33  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     34  * SUCH DAMAGE.
     35  *
     36  *	$Id: smc90cx6reg.h,v 1.1 1995/02/28 22:04:06 chopps Exp $
     37  */
     38 
     39 /*
     40  * The A2060/A560 card use the SMC COM90C26 Arcnet chipset.
     41  * First or last 16k segment, resp., write a fifo which drives the reset
     42  * line.
     43  * 2nd 16k segment contains the registers.
     44  * 3rd 16k segment contains the buffer RAM.
     45  * All are only accessible at even addresses.
     46  */
     47 
     48 
     49 /* CBM Arcnet board */
     50 #define MANUFACTURER_1 514
     51 #define PRODUCT_1        9
     52 
     53 /* Ameristar board */
     54 #define MANUFACTURER_2 1053
     55 #define PRODUCT_2         9
     56 
     57 typedef struct {
     58 	u_char volatile kick1;
     59 	u_char pad1[16383];
     60 
     61 	u_char volatile status; /* also intmask */
     62 
     63 	u_char pad2;
     64 	u_char volatile command;
     65 	u_char pad3[16381];
     66 	u_char volatile buffers[4096];	/* even bytes only */
     67 
     68 #define checkbyte	buffers[0]
     69 #define dipswitches	buffers[2]
     70 
     71 	u_char pad4[12228];
     72 	u_char volatile kick2;
     73 	u_char pad5[16383];
     74 } A2060;
     75 
     76 /* calculate address for board b, buffer no n and offset o */
     77 #define BUFPTR(b,n,o) (&(b)->buffers[(n)*512+(o)*2])
     78 
     79 #define ARC_TXDIS	 0x01
     80 #define ARC_RXDIS	 0x02
     81 #define ARC_TX(x)	(0x03 | ((x)<<3))
     82 #define ARC_RX(x)	(0x04 | ((x)<<3))
     83 #define ARC_RXBC(x)	(0x84 | ((x)<<3))
     84 
     85 #define ARC_CONF(x)  	(0x05 | (x))
     86 #define CLR_POR		 0x08
     87 #define CLR_RECONFIG	 0x10
     88 
     89 #define ARC_CLR(x)	(0x06 | (x))
     90 #define CONF_LONG	 0x08
     91 #define CONF_SHORT	 0x00
     92 
     93 /*
     94  * These are not in the COM90C65 docs. Derived from the arcnet.asm
     95  * packet driver by Philippe Prindeville and Russel Nelson.
     96  */
     97 
     98 #define ARC_LDTST(x)	(0x07 | (x))
     99 #define TEST_ON		 0x08
    100 #define TEST_OFF	 0x00
    101 
    102 #define ARC_TA		1	/* int mask also */
    103 #define ARC_TMA		2
    104 #define ARC_RECON	4	/* int mask also */
    105 #define ARC_TEST	8	/* not in the COM90C65 docs (see above) */
    106 #define ARC_POR		0x10	/* non maskable interrupt */
    107 #define ARC_ET1		0x20	/* timeout value bits, normally 1 */
    108 #define ARC_ET2		0x40	/* timeout value bits, normally 1 */
    109 #define ARC_RI		0x80	/* int mask also */
    110 
    111