Home | History | Annotate | Line # | Download | only in podulebus
      1  1.4   andvar /*	$NetBSD: if_ne_pbusreg.h,v 1.4 2024/02/10 09:21:52 andvar Exp $	*/
      2  1.1  reinoud 
      3  1.1  reinoud /*
      4  1.1  reinoud  * Copyright (c) 1998 The NetBSD Foundation, Inc.
      5  1.1  reinoud  * All rights reserved.
      6  1.1  reinoud  *
      7  1.1  reinoud  * This code is derived from software contributed to The NetBSD Foundation
      8  1.1  reinoud  * by Mark Brinicombe of Causality Limited.
      9  1.1  reinoud  *
     10  1.1  reinoud  * EtherH code Copyright (c) 1998 Mike Pumford
     11  1.1  reinoud  *
     12  1.1  reinoud  * Redistribution and use in source and binary forms, with or without
     13  1.1  reinoud  * modification, are permitted provided that the following conditions
     14  1.1  reinoud  * are met:
     15  1.1  reinoud  * 1. Redistributions of source code must retain the above copyright
     16  1.1  reinoud  *    notice, this list of conditions and the following disclaimer.
     17  1.1  reinoud  * 2. Redistributions in binary form must reproduce the above copyright
     18  1.1  reinoud  *    notice, this list of conditions and the following disclaimer in the
     19  1.1  reinoud  *    documentation and/or other materials provided with the distribution.
     20  1.1  reinoud  *
     21  1.1  reinoud  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     22  1.1  reinoud  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     23  1.1  reinoud  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     24  1.1  reinoud  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     25  1.1  reinoud  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     26  1.1  reinoud  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     27  1.1  reinoud  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     28  1.1  reinoud  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     29  1.1  reinoud  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     30  1.1  reinoud  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     31  1.1  reinoud  * POSSIBILITY OF SUCH DAMAGE.
     32  1.1  reinoud  *
     33  1.1  reinoud  * Register definitions for podulebus hosted ne2000 ethernet controllers
     34  1.1  reinoud  */
     35  1.1  reinoud 
     36  1.1  reinoud /* EtherM netslot cards */
     37  1.1  reinoud #define EM_NIC_OFFSET	0x0800
     38  1.1  reinoud #define EM_NIC_SIZE	(NE2000_NIC_NPORTS << EM_REGSHIFT)
     39  1.1  reinoud #define EM_ASIC_OFFSET	(EM_NIC_OFFSET + (NE2000_ASIC_OFFSET << EM_REGSHIFT))
     40  1.1  reinoud #define EM_ASIC_SIZE	(NE2000_ASIC_NPORTS << EM_REGSHIFT)
     41  1.1  reinoud #define EM_REGSHIFT	5
     42  1.1  reinoud 
     43  1.1  reinoud /* EtherM interface has a special Diagnostic status register */
     44  1.1  reinoud #define EM_DSR_REG	0x0d	/* Register number from ASIC base */
     45  1.1  reinoud 
     46  1.1  reinoud /* Diagnostic status register */
     47  1.1  reinoud #define EM_DSR_20M	(1 << 1) /* 20MHz VCO functioning */
     48  1.1  reinoud #define EM_DSR_TCOK	(1 << 2) /* Transmit clock functioning */
     49  1.1  reinoud #define EM_DSR_POL	(1 << 3) /* Polarity of UTP link */
     50  1.1  reinoud #define EM_DSR_JAB	(1 << 4) /* Jabber state */
     51  1.1  reinoud #define EM_DSR_LNK	(1 << 5) /* Link state */
     52  1.4   andvar #define EM_DSR_LBK	(1 << 6) /* Loopback mode */
     53  1.1  reinoud #define EM_DSR_UTP	(1 << 7) /* Twisted pair selected */
     54  1.1  reinoud 
     55  1.1  reinoud /* EtherLan 600 definitions */
     56  1.1  reinoud #define EH600_CONTROL_OFFSET    0x0a00
     57  1.1  reinoud #define EH600_CONTROL_SIZE      (1 << EH600_REGSHIFT)
     58  1.1  reinoud #define EH600_NIC_OFFSET	0x0800
     59  1.1  reinoud #define EH600_NIC_SIZE		(NE2000_NIC_NPORTS << EH600_REGSHIFT)
     60  1.1  reinoud #define EH600_ASIC_OFFSET	(EH600_NIC_OFFSET + (NE2000_ASIC_OFFSET \
     61  1.1  reinoud 				    << EH600_REGSHIFT))
     62  1.1  reinoud #define EH600_ASIC_SIZE		(NE2000_ASIC_NPORTS << EH600_REGSHIFT)
     63  1.1  reinoud #define EH600_REGSHIFT		2
     64  1.1  reinoud 
     65  1.1  reinoud #define EH600_MEM_START         0x100   /* buffer ram start */
     66  1.1  reinoud #define EH600_MEM_END           0x8000  /* buffer ram end */
     67  1.1  reinoud 
     68  1.1  reinoud /* Acorn EtherN registers */
     69  1.1  reinoud #define EN_REGSHIFT             3
     70  1.1  reinoud #define EN_NIC_OFFSET           0x400000
     71  1.1  reinoud #define EN_NIC_SIZE             (NE2000_NIC_NPORTS << EN_REGSHIFT)
     72  1.1  reinoud #define EN_ASIC_OFFSET	        (EN_NIC_OFFSET + (NE2000_ASIC_OFFSET \
     73  1.1  reinoud 				    << EN_REGSHIFT))
     74  1.1  reinoud #define EN_ASIC_SIZE		(NE2000_ASIC_NPORTS << EN_REGSHIFT)
     75  1.1  reinoud 
     76  1.1  reinoud /* Etherlan 600 control register */
     77  1.1  reinoud /*Write only */
     78  1.1  reinoud #define EH_INTR_MASK    (1 << 0)        /* Interrupt Mask.              */
     79  1.1  reinoud #define EH_ID_CONTROL   (1 << 1)        /* ID control.                  */
     80  1.1  reinoud /* Read only */
     81  1.1  reinoud #define EH_INTR_STAT    (1 << 0)        /* Interrupt status.            */
     82