1/* ********************************************************************* 2 * SB1250 Board Support Package 3 * 4 * Synchronous Serial Constants File: sb1250_syncser.h 5 * 6 * This module contains constants and macros useful for 7 * manipulating the SB1250's Synchronous Serial 8 * 9 * SB1250 specification level: User's manual 1/02/02 10 * 11 ********************************************************************* 12 * 13 * Copyright 2000,2001,2002,2003 14 * Broadcom Corporation. All rights reserved. 15 * 16 * This software is furnished under license and may be used and 17 * copied only in accordance with the following terms and 18 * conditions. Subject to these conditions, you may download, 19 * copy, install, use, modify and distribute modified or unmodified 20 * copies of this software in source and/or binary form. No title 21 * or ownership is transferred hereby. 22 * 23 * 1) Any source code used, modified or distributed must reproduce 24 * and retain this copyright notice and list of conditions 25 * as they appear in the source file. 26 * 27 * 2) No right is granted to use any trade name, trademark, or 28 * logo of Broadcom Corporation. The "Broadcom Corporation" 29 * name may not be used to endorse or promote products derived 30 * from this software without the prior written permission of 31 * Broadcom Corporation. 32 * 33 * 3) THIS SOFTWARE IS PROVIDED "AS-IS" AND ANY EXPRESS OR 34 * IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED 35 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 36 * PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT 37 * SHALL BROADCOM BE LIABLE FOR ANY DAMAGES WHATSOEVER, AND IN 38 * PARTICULAR, BROADCOM SHALL NOT BE LIABLE FOR DIRECT, INDIRECT, 39 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 40 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 41 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 42 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 43 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 44 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE), EVEN IF ADVISED OF 45 * THE POSSIBILITY OF SUCH DAMAGE. 46 ********************************************************************* */ 47 48 49#ifndef _SB1250_SYNCSER_H 50#define _SB1250_SYNCSER_H 51 52#include "sb1250_defs.h" 53 54/* 55 * Serial Mode Configuration Register 56 */ 57 58#define M_SYNCSER_CRC_MODE _SB_MAKEMASK1(0) 59#define M_SYNCSER_MSB_FIRST _SB_MAKEMASK1(1) 60 61#define S_SYNCSER_FLAG_NUM 2 62#define M_SYNCSER_FLAG_NUM _SB_MAKEMASK(4,S_SYNCSER_FLAG_NUM) 63#define V_SYNCSER_FLAG_NUM _SB_MAKEVALUE(x,S_SYNCSER_FLAG_NUM) 64 65#define M_SYNCSER_FLAG_EN _SB_MAKEMASK1(6) 66#define M_SYNCSER_HDLC_EN _SB_MAKEMASK1(7) 67#define M_SYNCSER_LOOP_MODE _SB_MAKEMASK1(8) 68#define M_SYNCSER_LOOPBACK _SB_MAKEMASK1(9) 69 70/* 71 * Serial Clock Source and Line Interface Mode Register 72 */ 73 74#define M_SYNCSER_RXCLK_INV _SB_MAKEMASK1(0) 75#define M_SYNCSER_RXCLK_EXT _SB_MAKEMASK1(1) 76 77#define S_SYNCSER_RXSYNC_DLY 2 78#define M_SYNCSER_RXSYNC_DLY _SB_MAKEMASK(2,S_SYNCSER_RXSYNC_DLY) 79#define V_SYNCSER_RXSYNC_DLY(x) _SB_MAKEVALUE(x,S_SYNCSER_RXSYNC_DLY) 80 81#define M_SYNCSER_RXSYNC_LOW _SB_MAKEMASK1(4) 82#define M_SYNCSER_RXSTRB_LOW _SB_MAKEMASK1(5) 83 84#define M_SYNCSER_RXSYNC_EDGE _SB_MAKEMASK1(6) 85#define M_SYNCSER_RXSYNC_INT _SB_MAKEMASK1(7) 86 87#define M_SYNCSER_TXCLK_INV _SB_MAKEMASK1(8) 88#define M_SYNCSER_TXCLK_EXT _SB_MAKEMASK1(9) 89 90#define S_SYNCSER_TXSYNC_DLY 10 91#define M_SYNCSER_TXSYNC_DLY _SB_MAKEMASK(2,S_SYNCSER_TXSYNC_DLY) 92#define V_SYNCSER_TXSYNC_DLY(x) _SB_MAKEVALUE(x,S_SYNCSER_TXSYNC_DLY) 93 94#define M_SYNCSER_TXSYNC_LOW _SB_MAKEMASK1(12) 95#define M_SYNCSER_TXSTRB_LOW _SB_MAKEMASK1(13) 96 97#define M_SYNCSER_TXSYNC_EDGE _SB_MAKEMASK1(14) 98#define M_SYNCSER_TXSYNC_INT _SB_MAKEMASK1(15) 99 100/* 101 * Serial Command Register 102 */ 103 104#define M_SYNCSER_CMD_RX_EN _SB_MAKEMASK1(0) 105#define M_SYNCSER_CMD_TX_EN _SB_MAKEMASK1(1) 106#define M_SYNCSER_CMD_RX_RESET _SB_MAKEMASK1(2) 107#define M_SYNCSER_CMD_TX_RESET _SB_MAKEMASK1(3) 108#define M_SYNCSER_CMD_TX_PAUSE _SB_MAKEMASK1(5) 109 110/* 111 * Serial DMA Enable Register 112 */ 113 114#define M_SYNCSER_DMA_RX_EN _SB_MAKEMASK1(0) 115#define M_SYNCSER_DMA_TX_EN _SB_MAKEMASK1(4) 116 117/* 118 * Serial Status Register 119 */ 120 121#define M_SYNCSER_RX_CRCERR _SB_MAKEMASK1(0) 122#define M_SYNCSER_RX_ABORT _SB_MAKEMASK1(1) 123#define M_SYNCSER_RX_OCTET _SB_MAKEMASK1(2) 124#define M_SYNCSER_RX_LONGFRM _SB_MAKEMASK1(3) 125#define M_SYNCSER_RX_SHORTFRM _SB_MAKEMASK1(4) 126#define M_SYNCSER_RX_OVERRUN _SB_MAKEMASK1(5) 127#define M_SYNCSER_RX_SYNC_ERR _SB_MAKEMASK1(6) 128#define M_SYNCSER_TX_CRCERR _SB_MAKEMASK1(8) 129#define M_SYNCSER_TX_UNDERRUN _SB_MAKEMASK1(9) 130#define M_SYNCSER_TX_SYNC_ERR _SB_MAKEMASK1(10) 131#define M_SYNCSER_TX_PAUSE_COMPLETE _SB_MAKEMASK1(11) 132#define M_SYNCSER_RX_EOP_COUNT _SB_MAKEMASK1(16) 133#define M_SYNCSER_RX_EOP_TIMER _SB_MAKEMASK1(17) 134#define M_SYNCSER_RX_EOP_SEEN _SB_MAKEMASK1(18) 135#define M_SYNCSER_RX_HWM _SB_MAKEMASK1(19) 136#define M_SYNCSER_RX_LWM _SB_MAKEMASK1(20) 137#define M_SYNCSER_RX_DSCR _SB_MAKEMASK1(21) 138#define M_SYNCSER_RX_DERR _SB_MAKEMASK1(22) 139#define M_SYNCSER_TX_EOP_COUNT _SB_MAKEMASK1(24) 140#define M_SYNCSER_TX_EOP_TIMER _SB_MAKEMASK1(25) 141#define M_SYNCSER_TX_EOP_SEEN _SB_MAKEMASK1(26) 142#define M_SYNCSER_TX_HWM _SB_MAKEMASK1(27) 143#define M_SYNCSER_TX_LWM _SB_MAKEMASK1(28) 144#define M_SYNCSER_TX_DSCR _SB_MAKEMASK1(29) 145#define M_SYNCSER_TX_DERR _SB_MAKEMASK1(30) 146#define M_SYNCSER_TX_DZERO _SB_MAKEMASK1(31) 147 148/* 149 * Sequencer Table Entry format 150 */ 151 152#define M_SYNCSER_SEQ_LAST _SB_MAKEMASK1(0) 153#define M_SYNCSER_SEQ_BYTE _SB_MAKEMASK1(1) 154 155#define S_SYNCSER_SEQ_COUNT 2 156#define M_SYNCSER_SEQ_COUNT _SB_MAKEMASK(4,S_SYNCSER_SEQ_COUNT) 157#define V_SYNCSER_SEQ_COUNT(x) _SB_MAKEVALUE(x,S_SYNCSER_SEQ_COUNT) 158 159#define M_SYNCSER_SEQ_ENABLE _SB_MAKEMASK1(6) 160#define M_SYNCSER_SEQ_STROBE _SB_MAKEMASK1(7) 161 162#endif 163