1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright (c) 1999-2000 by Sun Microsystems, Inc. 24 * All rights reserved. 25 */ 26 27 #ifndef _SYS_1394_ADAPTERS_HCI1394_RIO_REGS_H 28 #define _SYS_1394_ADAPTERS_HCI1394_RIO_REGS_H 29 30 /* 31 * hci1394_rio_regs.h 32 * Sun Microsystems RIO chipset 33 * See the RIO specification (r1.0), section 5.9, for a description 34 * of the vendor specific registers. 35 */ 36 37 #ifdef __cplusplus 38 extern "C" { 39 #endif 40 41 42 /* 43 * RIO's vendor specific register mapping information. What register set it 44 * uses and the offset/size of the register set. 45 */ 46 #define RIOREG_REG_BASE 0x2 47 #define RIOREG_OFFSET 0x0 48 #define RIOREG_LENGTH 0x800 49 50 /* 51 * For RIO pass 1, we will setup the GUID in as part of the vendor specific 52 * init. This is to support the RIO PPX card (since it does not have firmware 53 * to setup the GUID. 54 */ 55 #define RIOREG_GUID_MASK 0x000000FFFFFFFFFF 56 #define RIOREG_GUID_SUN_MICROSYSTEMS 0x0800200000000000 57 #define RIOREG_SUNW_RIO_PASS1 0x01080020 58 59 /* 60 * RIO vendor specific registers. These are the offsets of the registers. They 61 * should be used as paramteres to hci1394_vendor_reg_write() and 62 * hci1394_vendor_reg_read(). 63 */ 64 #define RIOREG_INTR_EVENT 0x00 65 #define RIOREG_INTR_MASK 0x04 66 #define RIOREG_DMA_BURST_SIZE 0x08 67 #define RIOREG_XMIT_CONTROL 0x0C 68 #define RIOREG_HOST_CONTROL 0x10 69 #define RIOREG_STATS_RETRIES 0x14 70 #define RIOREG_STATS_ERRORS 0x18 71 #define RIOREG_STATS_PHYSICAL 0x1C 72 73 /* RIO interrupt event & mask bit offsets */ 74 #define RIOREG_INTR_STATS1 0x001 75 #define RIOREG_INTR_STATS2 0x002 76 #define RIOREG_INTR_STATS3 0x004 77 #define RIOREG_INTR_STATS4 0x008 78 #define RIOREG_INTR_STATS5 0x010 79 #define RIOREG_INTR_STATS6 0x020 80 #define RIOREG_INTR_STATS7 0x040 81 #define RIOREG_INTR_STATS8 0x080 82 #define RIOREG_INTR_LINKON 0x100 83 84 /* dma_burst_size (field defs) */ 85 #define RIOREG_INF_BURST_SHIFT 0 86 #define RIOREG_DBURST_SHIFT 1 87 #define RIOREG_RXBURST_SHIFT 26 88 #define RIOREG_TXBURST_SHIFT 28 89 #define RIOREG_PFBURST_SHIFT 30 90 #define RIOREG_INF_BURST_MASK (1 << RIOREG_INF_BURST_SHIFT) 91 #define RIOREG_DBURST_MASK (1 << RIOREG_DBURST_SHIFT) 92 #define RIOREG_RXBURST_MASK (3 << RIOREG_RXBURST_SHIFT) 93 #define RIOREG_TXBURST_MASK (3 << RIOREG_TXBURST_SHIFT) 94 #define RIOREG_PFBURST_MASK (3 << RIOREG_PFBURST_SHIFT) 95 96 /* dma_burst_size (values) */ 97 #define RIOREG_BURST_32 0 /* 32 bytes or less */ 98 #define RIOREG_BURST_64 1 /* 64 bytes or less */ 99 #define RIOREG_BURST_128 2 /* 128 bytes or less */ 100 #define RIOREG_BURST_256 3 /* 256 bytes or less */ 101 102 /* xmit ctrl (field defs) */ 103 #define RIOREG_XMIT_BND1_SHIFT 0 104 #define RIOREG_XMIT_BND2_SHIFT 8 105 #define RIOREG_XMIT_BND1_MASK (0xFF << RIOREG_XMIT_BND1_SHIFT) 106 #define RIOREG_XMIT_BND2_MASK (0xFF << RIOREG_XMIT_BND2_SHIFT) 107 108 /* host control (field defs) */ 109 #define RIOREG_HOST_ATREQ 0x00000001 110 #define RIOREG_HOST_ATRESP 0x00000002 111 #define RIOREG_HOST_IT1 0x00000004 112 #define RIOREG_HOST_IT2 0x00000008 113 #define RIOREG_HOST_IT3 0x00000010 114 #define RIOREG_HOST_IT4 0x00000020 115 #define RIOREG_HOST_ARREQ 0x00000040 116 #define RIOREG_HOST_ARRESP 0x00000080 117 #define RIOREG_HOST_IR1 0x00000100 118 #define RIOREG_HOST_IR2 0x00000200 119 #define RIOREG_HOST_IR3 0x00000400 120 #define RIOREG_HOST_IR4 0x00000800 121 #define RIOREG_HOST_BWCAT 0x02000000 122 #define RIOREG_HOST_BRCAT 0x04000000 123 #define RIOREG_HOST_ISOCTL 0xC0000000 124 125 /* Allow Descriptor pre-fetching */ 126 #define RIOREG_HOST_CONTROL_SETTING \ 127 (RIOREG_HOST_ATREQ | RIOREG_HOST_ATRESP | RIOREG_HOST_IT1 | \ 128 RIOREG_HOST_IT2 | RIOREG_HOST_IT3 | RIOREG_HOST_IT4 | \ 129 RIOREG_HOST_ARREQ | RIOREG_HOST_ARRESP | RIOREG_HOST_IR1 | \ 130 RIOREG_HOST_IR2 | RIOREG_HOST_IR3 | RIOREG_HOST_IR4) 131 132 /* stats_retries (field defs) */ 133 #define RIOREG_RET_PHYS 0xFF000000 134 #define RIOREG_RET_ATS 0x0000FF00 135 #define RIOREG_RET_ATQ 0x000000FF 136 137 /* stats_errors (field defs) */ 138 #define RIOREG_ERR_EACKR 0x000000FF 139 #define RIOREG_ERR_EACKX 0x0000FF00 140 #define RIOREG_ERR_BUS 0x0FFF0000 141 142 /* stats_phys (field defs) */ 143 #define RIOREG_PHYS_WRQ 0x000000FF 144 #define RIOREG_PHYS_RDQ 0x00FF0000 145 146 147 #ifdef __cplusplus 148 } 149 #endif 150 151 #endif /* _SYS_1394_ADAPTERS_HCI1394_RIO_REGS_H */ 152