153905Smckusick /* 2*63314Sbostic * Copyright (c) 1992, 1993 3*63314Sbostic * The Regents of the University of California. All rights reserved. 453905Smckusick * 553905Smckusick * This code is derived from software contributed to Berkeley by 653905Smckusick * Sony Corp. and Kazumasa Utashiro of Software Research Associates, Inc. 753905Smckusick * 853905Smckusick * %sccs.include.redist.c% 953905Smckusick * 1053905Smckusick * from: $Hdr: sccreg.h,v 4.300 91/06/09 06:44:58 root Rel41 $ SONY 1153905Smckusick * 12*63314Sbostic * @(#)sccreg.h 8.1 (Berkeley) 06/11/93 1353905Smckusick */ 1453905Smckusick 1553905Smckusick #ifndef _SCCREG_ 1653905Smckusick #define _SCCREG_ 1753905Smckusick 1853905Smckusick /* 1953905Smckusick * SCC register 2053905Smckusick */ 2153905Smckusick 2253905Smckusick struct scc_reg { 2353905Smckusick u_char ctrl; /* control register */ 2453905Smckusick u_char data; /* data register */ 2553905Smckusick }; 2653905Smckusick 2753905Smckusick /* 2853905Smckusick * SCC read register 2953905Smckusick */ 3053905Smckusick 3153905Smckusick #define RR0 0 3253905Smckusick #define RR1 1 3353905Smckusick #define RR2 2 3453905Smckusick #define RR3 3 3553905Smckusick #define RR10 10 3653905Smckusick #define RR12 12 3753905Smckusick #define RR13 13 3853905Smckusick #define RR15 15 3953905Smckusick 4053905Smckusick #define R0_BREAK 0x80 /* Break/Abort */ 4153905Smckusick #define R0_UDRUN 0x40 /* Tx Underrun/EOM */ 4253905Smckusick #define R0_CTS 0x20 /* CTS */ 4353905Smckusick #define R0_SYNC 0x10 /* Sync/Hunt */ 4453905Smckusick #define R0_DCD 0x08 /* DCD */ 4553905Smckusick #define R0_TxBE 0x04 /* Tx buffer empty */ 4653905Smckusick #define R0_ZERO 0x02 /* Zero count */ 4753905Smckusick #define R0_RxCA 0x01 /* Rx char. available */ 4853905Smckusick 4953905Smckusick #define R1_EOF 0x80 /* End Of Frame (SDLC) */ 5053905Smckusick #define R1_CRC 0x40 /* CRC/Framing Error */ 5153905Smckusick #define R1_OVRUN 0x20 /* Rx Overrun */ 5253905Smckusick #define R1_PARITY 0x10 /* Parity Error */ 5353905Smckusick #define R1_RESID 0x0e /* Residue code */ 5453905Smckusick #define R1_SENT 0x01 /* All sent */ 5553905Smckusick 5653905Smckusick #define R3_RxA 0x20 /* Channel A Rx IP */ 5753905Smckusick #define R3_TxA 0x10 /* Channel A Tx IP */ 5853905Smckusick #define R3_EXTA 0x08 /* Channel A EXT/STAT */ 5953905Smckusick #define R3_RxB 0x20 /* Channel B Rx IP */ 6053905Smckusick #define R3_TxB 0x10 /* Channel B Tx IP */ 6153905Smckusick #define R3_EXTB 0x08 /* Channel B EXT/STAT */ 6253905Smckusick 6353905Smckusick #define R10_ONEC 0x80 /* One clock missing */ 6453905Smckusick #define R10_TWOC 0x40 /* Two clock missing */ 6553905Smckusick #define R10_LOOP 0x10 /* Loop Sending */ 6653905Smckusick #define R10_ONLOOP 0x02 /* On Loop */ 6753905Smckusick 6853905Smckusick #define R15_BREAK 0x80 /* Break/Abort IE */ 6953905Smckusick #define R15_UDRUN 0x40 /* Tx Underrun IE */ 7053905Smckusick #define R15_CTS 0x20 /* CTS IE */ 7153905Smckusick #define R15_SYNC 0x10 /* Sync/Hunt IE */ 7253905Smckusick #define R15_DCD 0x08 /* DCD IE */ 7353905Smckusick #define R15_ZERO 0x02 /* Zero count IE */ 7453905Smckusick 7553905Smckusick /* 7653905Smckusick * SCC write register 7753905Smckusick */ 7853905Smckusick 7953905Smckusick #define WR0 0 8053905Smckusick #define WR1 1 8153905Smckusick #define WR2 2 8253905Smckusick #define WR3 3 8353905Smckusick #define WR4 4 8453905Smckusick #define WR5 5 8553905Smckusick #define WR6 6 8653905Smckusick #define WR7 7 8753905Smckusick #define WR9 9 8853905Smckusick #define WR10 10 8953905Smckusick #define WR11 11 9053905Smckusick #define WR12 12 9153905Smckusick #define WR13 13 9253905Smckusick #define WR14 14 9353905Smckusick #define WR15 15 9453905Smckusick 9553905Smckusick #define W0_RES_UDRUN 0xc0 /* Reset Tx Underrun/EOM */ 9653905Smckusick #define W0_RES_TxCRC 0x80 /* Reset Tx CRC generator */ 9753905Smckusick #define W0_RES_RxCRC 0x40 /* Reset Rx CRC checker */ 9853905Smckusick #define W0_RES_IUS 0x38 /* Reset Highest IUS */ 9953905Smckusick #define W0_RES_ERROR 0x30 /* Error reset */ 10053905Smckusick #define W0_RES_TxINT 0x28 /* Reset TxINT pending */ 10153905Smckusick #define W0_RxINTE 0x20 /* Enable RxINT on next char. */ 10253905Smckusick #define W0_SND_ABORT 0x18 /* Send Abort (SDLC) */ 10353905Smckusick #define W0_RES_EXT 0x10 /* Reset EXT/STAT interrupts */ 10453905Smckusick 10553905Smckusick #define W1_EN_WAIT 0x80 /* WAIT/DMA request enable */ 10653905Smckusick #define W1_WAIT_FUNC 0x40 /* WAIT/DMA request function */ 10753905Smckusick #define W1_WAIT_REQ 0x20 /* WAIT/DMA request on Rx/Tx */ 10853905Smckusick 10953905Smckusick #define W1_RxINT_SC 0x18 /* Rx INT on special condition */ 11053905Smckusick #define W1_RxINT_ALL 0x10 /* Rx INT on all character */ 11153905Smckusick #define W1_RxINT_FRST 0x08 /* Rx INT on first character */ 11253905Smckusick #define W1_PARITY 0x04 /* Parity is special condition */ 11353905Smckusick #define W1_TxINTE 0x02 /* Tx INT enable */ 11453905Smckusick #define W1_EXTINTE 0x01 /* EXT INT enable */ 11553905Smckusick 11653905Smckusick #define W3_Rx8BIT 0xc0 /* Rx 8 bits/character */ 11753905Smckusick #define W3_Rx6BIT 0x80 /* Rx 6 bits/character */ 11853905Smckusick #define W3_Rx7BIT 0x40 /* Rx 7 bits/character */ 11953905Smckusick #define W3_Rx5BIT 0x00 /* Rx 5 bits/character */ 12053905Smckusick 12153905Smckusick #define W3_AUTO 0x20 /* Auto enable */ 12253905Smckusick #define W3_HUNT 0x10 /* Enter Hunt mode */ 12353905Smckusick #define W3_RxCRC 0x08 /* Rx CRC enable */ 12453905Smckusick #define W3_ADDR 0x04 /* Address search mode (SDLC) */ 12553905Smckusick #define W3_SYNCI 0x02 /* Sync char. load inhibit */ 12653905Smckusick #define W3_RxE 0x01 /* Rx enable */ 12753905Smckusick 12853905Smckusick #define W4_X64 0xc0 /* X64 clock mode */ 12953905Smckusick #define W4_X32 0x80 /* X32 clock mode */ 13053905Smckusick #define W4_X16 0x40 /* X16 clock mode */ 13153905Smckusick #define W4_X1 0x00 /* X1 clock mode */ 13253905Smckusick 13353905Smckusick #define W4_EXTSYNC 0x30 /* External Sync mode */ 13453905Smckusick #define W4_SDLC 0x20 /* SDLC mode */ 13553905Smckusick #define W4_SYNC16 0x10 /* 16 bit sync character */ 13653905Smckusick #define W4_SYNC8 0x00 /* 8 bit sync character */ 13753905Smckusick 13853905Smckusick #define W4_STOP2 0x0c /* 2 stop bits/character */ 13953905Smckusick #define W4_STOP1_5 0x08 /* 1.5 stop bits/character */ 14053905Smckusick #define W4_STOP1 0x04 /* 1 stop bit/character */ 14153905Smckusick #define W4_SYNC 0x00 /* Sync mode enable */ 14253905Smckusick 14353905Smckusick #define W4_EVEN 0x02 /* Parity Even */ 14453905Smckusick #define W4_PARITY 0x01 /* Parity enable */ 14553905Smckusick 14653905Smckusick #define W5_DTR 0x80 /* DTR */ 14753905Smckusick 14853905Smckusick #define W5_Tx8BIT 0x60 /* Tx 8 bits/character */ 14953905Smckusick #define W5_Tx6BIT 0x40 /* Tx 6 bits/character */ 15053905Smckusick #define W5_Tx7BIT 0x20 /* Tx 7 bits/character */ 15153905Smckusick #define W5_Tx5BIT 0x00 /* Tx 5 bits/character */ 15253905Smckusick 15353905Smckusick #define W5_BREAK 0x10 /* Send Break */ 15453905Smckusick #define W5_TxE 0x08 /* Tx enable */ 15553905Smckusick #define W5_CRC16 0x04 /* SDLC/CRC-16 */ 15653905Smckusick #define W5_RTS 0x02 /* RTS */ 15753905Smckusick #define W5_TxCRC 0x01 /* Tx CRC enable */ 15853905Smckusick 15953905Smckusick #define W9_RESET 0xc0 /* Force hardware reset */ 16053905Smckusick #define W9_RES_A 0x80 /* Channel reset A */ 16153905Smckusick #define W9_RES_B 0x40 /* Channel reset B */ 16253905Smckusick 16353905Smckusick #define W9_STAT_HIGH 0x10 /* Staus High/Low */ 16453905Smckusick #define W9_MIE 0x08 /* Master Int. enable */ 16553905Smckusick #define W9_DLC 0x04 /* Disable lower chain */ 16653905Smckusick #define W9_NV 0x02 /* Non Vector */ 16753905Smckusick #define W9_VIS 0x01 /* Vector Include Status */ 16853905Smckusick 16953905Smckusick #define W10_CRC_PRESET 0x80 /* CRC preset I/O */ 17053905Smckusick 17153905Smckusick #define W10_FM0 0x60 /* FM0 (transition = 0) */ 17253905Smckusick #define W10_FM1 0x40 /* FM1 (transition = 1) */ 17353905Smckusick #define W10_NRZI 0x20 /* NRZI */ 17453905Smckusick #define W10_NRZ 0x00 /* NRZ */ 17553905Smckusick 17653905Smckusick #define W10_POLL 0x10 /* Go active on poll */ 17753905Smckusick #define W10_MARK 0x08 /* Mark/Flag idle */ 17853905Smckusick #define W10_ABORT 0x04 /* Abort/Flag on underrun */ 17953905Smckusick #define W10_LOOP 0x02 /* Loop mode */ 18053905Smckusick #define W10_SYNC6 0x01 /* 6 bit/8 bit sync */ 18153905Smckusick 18253905Smckusick #define W11_RTxC_XTAL 0x80 /* RTxC Xtal */ 18353905Smckusick 18453905Smckusick #define W11_RxC_DPLL 0x60 /* RxC = DPLL output */ 18553905Smckusick #define W11_RxC_BRG 0x40 /* RxC = BR Gen. output */ 18653905Smckusick #define W11_RxC_TRxC 0x20 /* RxC = TRxC pin */ 18753905Smckusick #define W11_RxC_RTxC 0x00 /* RxC = RTxC pin */ 18853905Smckusick 18953905Smckusick #define W11_TxC_DPLL 0x18 /* TxC = DPLL output */ 19053905Smckusick #define W11_TxC_BRG 0x10 /* TxC = BR Gen. output */ 19153905Smckusick #define W11_TxC_TRxC 0x08 /* TxC = TRxC pin */ 19253905Smckusick #define W11_TxC_RTxC 0x00 /* TxC = RTxC pin */ 19353905Smckusick 19453905Smckusick #define W11_TRxC_O 0x04 /* TRxC O/I */ 19553905Smckusick 19653905Smckusick #define W11_TRxC_DPLL 0x03 /* TRxC = DPLL output */ 19753905Smckusick #define W11_TRxC_BRG 0x02 /* TRxC = BR Gen output */ 19853905Smckusick #define W11_TRxC_TxC 0x01 /* TRxC = Transmit clock */ 19953905Smckusick #define W11_TRxC_XTAL 0x00 /* TRxC = Xtal output */ 20053905Smckusick 20153905Smckusick #define W14_NRZI 0xe0 /* Set NRZI mode */ 20253905Smckusick #define W14_FM 0xc0 /* Set FM mode */ 20353905Smckusick #define W14_RTxC 0xa0 /* Set source = RTxC */ 20453905Smckusick #define W14_BRG 0x80 /* Set source = BR Gen. */ 20553905Smckusick #define W14_DIS_DPLL 0x60 /* Disable DPLL */ 20653905Smckusick #define W14_RES_CLK 0x40 /* Reset missing clock */ 20753905Smckusick #define W14_SEARCH 0x20 /* Enter search mode */ 20853905Smckusick 20953905Smckusick #define W14_LOCAL 0x10 /* Local loopback mode */ 21053905Smckusick #define W14_ECHO 0x08 /* Auto echo */ 21153905Smckusick #define W14_DTR 0x04 /* DTR/Request function */ 21253905Smckusick #define W14_BRG_SRC 0x02 /* BR Gen. source */ 21353905Smckusick #define W14_BRGE 0x01 /* BR Gen. enable */ 21453905Smckusick 21553905Smckusick #define W15_BREAK 0x80 /* Break/Abort IE */ 21653905Smckusick #define W15_UDRUN 0x40 /* Tx underrun/EOM IE */ 21753905Smckusick #define W15_CTS 0x20 /* CTS IE */ 21853905Smckusick #define W15_SYNC 0x10 /* Sync/Hunt IE */ 21953905Smckusick #define W15_DCD 0x08 /* DCD IE */ 22053905Smckusick #define W15_ZERO 0x02 /* Zero count IE */ 22153905Smckusick 22253905Smckusick #endif /* _SCCREG_ */ 223