Home | History | Annotate | Line # | Download | only in isapnp
isapnpreg.h revision 1.5.6.1
      1  1.5.6.1       eeh /*	$NetBSD: isapnpreg.h,v 1.5.6.1 1998/08/08 03:06:49 eeh Exp $	*/
      2      1.1  christos 
      3      1.1  christos /*
      4      1.1  christos  * Copyright (c) 1996 Christos Zoulas.  All rights reserved.
      5      1.1  christos  *
      6      1.1  christos  * Redistribution and use in source and binary forms, with or without
      7      1.1  christos  * modification, are permitted provided that the following conditions
      8      1.1  christos  * are met:
      9      1.1  christos  * 1. Redistributions of source code must retain the above copyright
     10      1.1  christos  *    notice, this list of conditions and the following disclaimer.
     11      1.1  christos  * 2. Redistributions in binary form must reproduce the above copyright
     12      1.1  christos  *    notice, this list of conditions and the following disclaimer in the
     13      1.1  christos  *    documentation and/or other materials provided with the distribution.
     14      1.1  christos  * 3. All advertising materials mentioning features or use of this software
     15      1.1  christos  *    must display the following acknowledgement:
     16      1.1  christos  *	This product includes software developed by Christos Zoulas.
     17      1.1  christos  * 4. The name of the author may not be used to endorse or promote products
     18      1.1  christos  *    derived from this software without specific prior written permission.
     19      1.1  christos  *
     20      1.1  christos  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     21      1.1  christos  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     22      1.1  christos  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     23      1.1  christos  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     24      1.1  christos  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     25      1.1  christos  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     26      1.1  christos  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     27      1.1  christos  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     28      1.1  christos  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     29      1.1  christos  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     30      1.1  christos  */
     31      1.1  christos 
     32  1.5.6.1       eeh #ifndef _DEV_ISAPNP_ISAPNPREG_H_
     33  1.5.6.1       eeh #define _DEV_ISAPNP_ISAPNPREG_H_
     34      1.1  christos /*
     35      1.1  christos  * ISA Plug and Play register definitions;
     36      1.1  christos  * From Plug and Play ISA Specification V1.0a, May 5 1994
     37      1.1  christos  */
     38      1.1  christos 
     39      1.1  christos #define ISAPNP_MAX_CARDS		8
     40      1.1  christos #define ISAPNP_MAX_IDENT		32
     41      1.2  christos #define ISAPNP_MAX_DEVCLASS		16
     42      1.1  christos #define ISAPNP_SERIAL_SIZE		9
     43      1.1  christos #define ISAPNP_MAX_TAGSIZE		256
     44      1.1  christos 
     45      1.1  christos #define ISAPNP_ADDR	0x279	/* Write only */
     46      1.1  christos #define ISAPNP_WRDATA	0xa79	/* Write only */
     47      1.1  christos 
     48      1.1  christos /* The read port is in range 0x203 to 0x3ff */
     49      1.1  christos #define ISAPNP_RDDATA_MIN	0x203	/* Read only */
     50      1.1  christos #define ISAPNP_RDDATA_MAX	0x3ff
     51      1.1  christos 
     52      1.1  christos #define ISAPNP_LFSR_INIT	0x6A	/* Initial value of LFSR sequence */
     53      1.5     mikel #define ISAPNP_LFSR_LENGTH	32	/* Number of values in LFSR sequence */
     54      1.1  christos 				/* Formula to compute the next value */
     55      1.1  christos #define ISAPNP_LFSR_NEXT(v) (((v) >> 1) | (((v) & 1) ^ (((v) & 2) >> 1)) << 7)
     56      1.1  christos 
     57      1.1  christos #define ISAPNP_SET_RD_PORT				0x00
     58      1.1  christos #define ISAPNP_SERIAL_ISOLATION				0x01
     59      1.1  christos #define ISAPNP_CONFIG_CONTROL				0x02
     60      1.1  christos #define		ISAPNP_CC_RESET				0x01
     61      1.3  christos #define		ISAPNP_CC_WAIT_FOR_KEY			0x02
     62      1.1  christos #define		ISAPNP_CC_RESET_CSN			0x04
     63      1.1  christos #define		ISAPNP_CC_RESET_DRV			0x07
     64      1.1  christos #define ISAPNP_WAKE					0x03
     65      1.1  christos #define ISAPNP_RESOURCE_DATA				0x04
     66      1.1  christos #define ISAPNP_STATUS					0x05
     67      1.1  christos #define ISAPNP_CARD_SELECT_NUM				0x06
     68      1.1  christos #define ISAPNP_LOGICAL_DEV_NUM				0x07
     69      1.1  christos 
     70      1.1  christos #define ISAPNP_ACTIVATE					0x30
     71      1.1  christos #define ISAPNP_IO_RANGE_CHECK				0x31
     72      1.1  christos 
     73      1.1  christos #define ISAPNP_NUM_MEM					4
     74      1.1  christos #define ISAPNP_MEM_DESC { 0x40, 0x48, 0x50, 0x58 }
     75      1.1  christos #define		ISAPNP_MEM_BASE_23_16			0x0
     76      1.1  christos #define		ISAPNP_MEM_BASE_15_8			0x1
     77      1.1  christos #define		ISAPNP_MEM_CONTROL			0x2
     78      1.1  christos #define			ISAPNP_MEM_CONTROL_LIMIT	1
     79      1.1  christos #define			ISAPNP_MEM_CONTROL_16		2
     80      1.1  christos #define		ISAPNP_MEM_LRANGE_23_16			0x3
     81      1.1  christos #define		ISAPNP_MEM_LRANGE_15_8			0x4
     82      1.1  christos 
     83      1.1  christos #define ISAPNP_NUM_IO					8
     84      1.1  christos #define ISAPNP_IO_DESC { 0x60, 0x62, 0x64, 0x68, 0x6a, 0x6c, 0x6e }
     85      1.1  christos #define		ISAPNP_IO_BASE_15_8			0x0
     86      1.1  christos #define		ISAPNP_IO_BASE_7_0			0x1
     87      1.1  christos 
     88      1.1  christos #define ISAPNP_NUM_IRQ					16
     89      1.1  christos #define ISAPNP_IRQ_DESC { 0x70, 0x72 }
     90      1.1  christos #define		ISAPNP_IRQ_NUMBER			0x0
     91      1.1  christos #define		ISAPNP_IRQ_CONTROL			0x1
     92      1.1  christos #define			ISAPNP_IRQ_LEVEL		1
     93      1.1  christos #define			ISAPNP_IRQ_HIGH			2
     94      1.1  christos 
     95      1.1  christos #define ISAPNP_NUM_DRQ					8
     96      1.4   mycroft #define ISAPNP_DRQ_DESC { 0x74, 0x75 }
     97      1.1  christos 
     98      1.1  christos #define ISAPNP_NUM_MEM32				4
     99      1.1  christos #define ISAPNP_MEM32_DESC { 0x76, 0x80, 0x90, 0xa0 }
    100      1.1  christos #define		ISAPNP_MEM32_BASE_31_24			0x0
    101      1.1  christos #define		ISAPNP_MEM32_BASE_23_16			0x1
    102      1.1  christos #define		ISAPNP_MEM32_BASE_15_8			0x2
    103      1.1  christos #define		ISAPNP_MEM32_BASE_7_0			0x3
    104      1.1  christos #define		ISAPNP_MEM32_CONTROL			0x4
    105      1.1  christos #define			ISAPNP_MEM32_CONTROL_LIMIT	1
    106      1.1  christos #define			ISAPNP_MEM32_CONTROL_16		2
    107      1.1  christos #define			ISAPNP_MEM32_CONTROL_32		6
    108      1.1  christos #define		ISAPNP_MEM32_LRANGE_31_24		0x5
    109      1.1  christos #define		ISAPNP_MEM32_LRANGE_23_16		0x6
    110      1.1  christos #define		ISAPNP_MEM32_LRANGE_15_8		0x7
    111      1.1  christos #define		ISAPNP_MEM32_LRANGE_7_0			0x8
    112      1.1  christos 
    113      1.1  christos /* Small Tags */
    114      1.1  christos #define ISAPNP_TAG_VERSION_NUM				0x1
    115      1.1  christos #define ISAPNP_TAG_LOGICAL_DEV_ID			0x2
    116      1.1  christos #define ISAPNP_TAG_COMPAT_DEV_ID			0x3
    117      1.1  christos #define ISAPNP_TAG_IRQ_FORMAT				0x4
    118      1.1  christos #define		ISAPNP_IRQTYPE_EDGE_PLUS		1
    119      1.1  christos #define		ISAPNP_IRQTYPE_EDGE_MINUS		2
    120      1.1  christos #define		ISAPNP_IRQTYPE_LEVEL_PLUS		4
    121      1.1  christos #define		ISAPNP_IRQTYPE_LEVEL_MINUS		8
    122      1.1  christos #define ISAPNP_TAG_DMA_FORMAT				0x5
    123      1.1  christos #define		ISAPNP_DMAWIDTH_8			0x00
    124      1.1  christos #define		ISAPNP_DMAWIDTH_8_16			0x01
    125      1.1  christos #define		ISAPNP_DMAWIDTH_16			0x02
    126      1.1  christos #define		ISAPNP_DMAWIDTH_RESERVED		0x03
    127      1.1  christos #define		ISAPNP_DMAWIDTH_MASK			0x03
    128      1.1  christos #define		ISAPNP_DMAATTR_BUS_MASTER		0x04
    129      1.1  christos #define		ISAPNP_DMAATTR_INCR_8			0x08
    130      1.1  christos #define		ISAPNP_DMAATTR_INCR_16			0x10
    131      1.1  christos #define		ISAPNP_DMAATTR_MASK			0x1c
    132      1.1  christos #define		ISAPNP_DMASPEED_COMPAT			0x00
    133      1.1  christos #define		ISAPNP_DMASPEED_A			0x20
    134      1.1  christos #define		ISAPNP_DMASPEED_B			0x40
    135      1.1  christos #define		ISAPNP_DMASPEED_F			0x60
    136      1.1  christos #define		ISAPNP_DMASPEED_MASK			0x60
    137      1.1  christos #define ISAPNP_TAG_DEP_START				0x6
    138      1.1  christos #define		ISAPNP_DEP_PREFERRED			0x0
    139      1.1  christos #define		ISAPNP_DEP_ACCEPTABLE			0x1
    140      1.1  christos #define		ISAPNP_DEP_FUNCTIONAL			0x2
    141      1.1  christos #define		ISAPNP_DEP_RESERVED			0x3
    142      1.1  christos #define		ISAPNP_DEP_MASK				0x3
    143      1.1  christos #define		ISAPNP_DEP_UNSET			0x80	/* Internal */
    144      1.1  christos #define		ISAPNP_DEP_CONFLICTING			0x81	/* Internal */
    145      1.1  christos #define ISAPNP_TAG_DEP_END				0x7
    146      1.1  christos #define ISAPNP_TAG_IO_PORT_DESC				0x8
    147      1.1  christos #define		ISAPNP_IOFLAGS_16			0x1
    148      1.1  christos #define ISAPNP_TAG_FIXED_IO_PORT_DESC			0x9
    149      1.1  christos #define ISAPNP_TAG_RESERVED1				0xa
    150      1.1  christos #define ISAPNP_TAG_RESERVED2				0xb
    151      1.1  christos #define ISAPNP_TAG_RESERVED3				0xc
    152      1.1  christos #define ISAPNP_TAG_RESERVED4				0xd
    153      1.1  christos #define ISAPNP_TAG_VENDOR_DEF				0xe
    154      1.1  christos #define ISAPNP_TAG_END					0xf
    155      1.1  christos 
    156      1.1  christos /* Large Tags */
    157      1.1  christos #define ISAPNP_LARGE_TAG				0x80
    158      1.1  christos #define ISAPNP_TAG_MEM_RANGE_DESC			0x81
    159      1.1  christos #define		ISAPNP_MEMATTR_WRITEABLE		0x01
    160      1.1  christos #define		ISAPNP_MEMATTR_CACHEABLE		0x02
    161      1.1  christos #define		ISAPNP_MEMATTR_HIGH_ADDR		0x04
    162      1.1  christos #define		ISAPNP_MEMATTR_SHADOWABLE		0x20
    163      1.1  christos #define		ISAPNP_MEMATTR_ROM			0x40
    164      1.1  christos #define		ISAPNP_MEMATTR_MASK			0x67
    165      1.1  christos #define		ISAPNP_MEMWIDTH_8			0x00
    166      1.1  christos #define		ISAPNP_MEMWIDTH_16			0x08
    167      1.1  christos #define		ISAPNP_MEMWIDTH_8_16			0x10
    168      1.1  christos #define		ISAPNP_MEMWIDTH_32			0x18
    169      1.1  christos #define		ISAPNP_MEMWIDTH_MASK			0x18
    170      1.1  christos #define ISAPNP_TAG_ANSI_IDENT_STRING			0x82
    171      1.1  christos #define ISAPNP_TAG_UNICODE_IDENT_STRING			0x83
    172      1.1  christos #define ISAPNP_TAG_VENDOR_DEFINED			0x84
    173      1.1  christos #define ISAPNP_TAG_MEM32_RANGE_DESC			0x85
    174      1.1  christos #define ISAPNP_TAG_FIXED_MEM32_RANGE_DESC		0x86
    175  1.5.6.1       eeh 
    176  1.5.6.1       eeh #endif /* ! _DEV_ISAPNP_ISAPNPREG_H_ */
    177