1*2874c5fdSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */ 21da177e4SLinus Torvalds /* 31da177e4SLinus Torvalds * hd64572.h Description of the Hitachi HD64572 (SCA-II), valid for 41da177e4SLinus Torvalds * CPU modes 0 & 2. 51da177e4SLinus Torvalds * 61da177e4SLinus Torvalds * Author: Ivan Passos <ivan@cyclades.com> 71da177e4SLinus Torvalds * 81da177e4SLinus Torvalds * Copyright: (c) 2000-2001 Cyclades Corp. 91da177e4SLinus Torvalds * 101da177e4SLinus Torvalds * $Log: hd64572.h,v $ 111da177e4SLinus Torvalds * Revision 3.1 2001/06/15 12:41:10 regina 121da177e4SLinus Torvalds * upping major version number 131da177e4SLinus Torvalds * 141da177e4SLinus Torvalds * Revision 1.1.1.1 2001/06/13 20:24:49 daniela 151da177e4SLinus Torvalds * PC300 initial CVS version (3.4.0-pre1) 161da177e4SLinus Torvalds * 171da177e4SLinus Torvalds * Revision 1.0 2000/01/25 ivan 181da177e4SLinus Torvalds * Initial version. 191da177e4SLinus Torvalds */ 201da177e4SLinus Torvalds 211da177e4SLinus Torvalds #ifndef __HD64572_H 221da177e4SLinus Torvalds #define __HD64572_H 231da177e4SLinus Torvalds 241da177e4SLinus Torvalds /* Illegal Access Register */ 251da177e4SLinus Torvalds #define ILAR 0x00 261da177e4SLinus Torvalds 271da177e4SLinus Torvalds /* Wait Controller Registers */ 281da177e4SLinus Torvalds #define PABR0L 0x20 /* Physical Addr Boundary Register 0 L */ 291da177e4SLinus Torvalds #define PABR0H 0x21 /* Physical Addr Boundary Register 0 H */ 301da177e4SLinus Torvalds #define PABR1L 0x22 /* Physical Addr Boundary Register 1 L */ 311da177e4SLinus Torvalds #define PABR1H 0x23 /* Physical Addr Boundary Register 1 H */ 321da177e4SLinus Torvalds #define WCRL 0x24 /* Wait Control Register L */ 331da177e4SLinus Torvalds #define WCRM 0x25 /* Wait Control Register M */ 341da177e4SLinus Torvalds #define WCRH 0x26 /* Wait Control Register H */ 351da177e4SLinus Torvalds 361da177e4SLinus Torvalds /* Interrupt Registers */ 371da177e4SLinus Torvalds #define IVR 0x60 /* Interrupt Vector Register */ 381da177e4SLinus Torvalds #define IMVR 0x64 /* Interrupt Modified Vector Register */ 391da177e4SLinus Torvalds #define ITCR 0x68 /* Interrupt Control Register */ 401da177e4SLinus Torvalds #define ISR0 0x6c /* Interrupt Status Register 0 */ 411da177e4SLinus Torvalds #define ISR1 0x70 /* Interrupt Status Register 1 */ 421da177e4SLinus Torvalds #define IER0 0x74 /* Interrupt Enable Register 0 */ 431da177e4SLinus Torvalds #define IER1 0x78 /* Interrupt Enable Register 1 */ 441da177e4SLinus Torvalds 451da177e4SLinus Torvalds /* Register Access Macros (chan is 0 or 1 in _any_ case) */ 461da177e4SLinus Torvalds #define M_REG(reg, chan) (reg + 0x80*chan) /* MSCI */ 471da177e4SLinus Torvalds #define DRX_REG(reg, chan) (reg + 0x40*chan) /* DMA Rx */ 481da177e4SLinus Torvalds #define DTX_REG(reg, chan) (reg + 0x20*(2*chan + 1)) /* DMA Tx */ 491da177e4SLinus Torvalds #define TRX_REG(reg, chan) (reg + 0x20*chan) /* Timer Rx */ 501da177e4SLinus Torvalds #define TTX_REG(reg, chan) (reg + 0x10*(2*chan + 1)) /* Timer Tx */ 511da177e4SLinus Torvalds #define ST_REG(reg, chan) (reg + 0x80*chan) /* Status Cnt */ 521da177e4SLinus Torvalds #define IR0_DRX(val, chan) ((val)<<(8*(chan))) /* Int DMA Rx */ 531da177e4SLinus Torvalds #define IR0_DTX(val, chan) ((val)<<(4*(2*chan + 1))) /* Int DMA Tx */ 541da177e4SLinus Torvalds #define IR0_M(val, chan) ((val)<<(8*(chan))) /* Int MSCI */ 551da177e4SLinus Torvalds 561da177e4SLinus Torvalds /* MSCI Channel Registers */ 571da177e4SLinus Torvalds #define MSCI0_OFFSET 0x00 581da177e4SLinus Torvalds #define MSCI1_OFFSET 0x80 591da177e4SLinus Torvalds 601da177e4SLinus Torvalds #define MD0 0x138 /* Mode reg 0 */ 611da177e4SLinus Torvalds #define MD1 0x139 /* Mode reg 1 */ 621da177e4SLinus Torvalds #define MD2 0x13a /* Mode reg 2 */ 631da177e4SLinus Torvalds #define MD3 0x13b /* Mode reg 3 */ 641da177e4SLinus Torvalds #define CTL 0x130 /* Control reg */ 651da177e4SLinus Torvalds #define RXS 0x13c /* RX clock source */ 661da177e4SLinus Torvalds #define TXS 0x13d /* TX clock source */ 671da177e4SLinus Torvalds #define EXS 0x13e /* External clock input selection */ 681da177e4SLinus Torvalds #define TMCT 0x144 /* Time constant (Tx) */ 691da177e4SLinus Torvalds #define TMCR 0x145 /* Time constant (Rx) */ 701da177e4SLinus Torvalds #define CMD 0x128 /* Command reg */ 711da177e4SLinus Torvalds #define ST0 0x118 /* Status reg 0 */ 721da177e4SLinus Torvalds #define ST1 0x119 /* Status reg 1 */ 731da177e4SLinus Torvalds #define ST2 0x11a /* Status reg 2 */ 741da177e4SLinus Torvalds #define ST3 0x11b /* Status reg 3 */ 751da177e4SLinus Torvalds #define ST4 0x11c /* Status reg 4 */ 761da177e4SLinus Torvalds #define FST 0x11d /* frame Status reg */ 771da177e4SLinus Torvalds #define IE0 0x120 /* Interrupt enable reg 0 */ 781da177e4SLinus Torvalds #define IE1 0x121 /* Interrupt enable reg 1 */ 791da177e4SLinus Torvalds #define IE2 0x122 /* Interrupt enable reg 2 */ 801da177e4SLinus Torvalds #define IE4 0x124 /* Interrupt enable reg 4 */ 811da177e4SLinus Torvalds #define FIE 0x125 /* Frame Interrupt enable reg */ 821da177e4SLinus Torvalds #define SA0 0x140 /* Syn Address reg 0 */ 831da177e4SLinus Torvalds #define SA1 0x141 /* Syn Address reg 1 */ 841da177e4SLinus Torvalds #define IDL 0x142 /* Idle register */ 851da177e4SLinus Torvalds #define TRBL 0x100 /* TX/RX buffer reg L */ 861da177e4SLinus Torvalds #define TRBK 0x101 /* TX/RX buffer reg K */ 871da177e4SLinus Torvalds #define TRBJ 0x102 /* TX/RX buffer reg J */ 881da177e4SLinus Torvalds #define TRBH 0x103 /* TX/RX buffer reg H */ 891da177e4SLinus Torvalds #define TRC0 0x148 /* TX Ready control reg 0 */ 901da177e4SLinus Torvalds #define TRC1 0x149 /* TX Ready control reg 1 */ 911da177e4SLinus Torvalds #define RRC 0x14a /* RX Ready control reg */ 921da177e4SLinus Torvalds #define CST0 0x108 /* Current Status Register 0 */ 931da177e4SLinus Torvalds #define CST1 0x109 /* Current Status Register 1 */ 941da177e4SLinus Torvalds #define CST2 0x10a /* Current Status Register 2 */ 951da177e4SLinus Torvalds #define CST3 0x10b /* Current Status Register 3 */ 961da177e4SLinus Torvalds #define GPO 0x131 /* General Purpose Output Pin Ctl Reg */ 971da177e4SLinus Torvalds #define TFS 0x14b /* Tx Start Threshold Ctl Reg */ 981da177e4SLinus Torvalds #define TFN 0x143 /* Inter-transmit-frame Time Fill Ctl Reg */ 991da177e4SLinus Torvalds #define TBN 0x110 /* Tx Buffer Number Reg */ 1001da177e4SLinus Torvalds #define RBN 0x111 /* Rx Buffer Number Reg */ 1011da177e4SLinus Torvalds #define TNR0 0x150 /* Tx DMA Request Ctl Reg 0 */ 1021da177e4SLinus Torvalds #define TNR1 0x151 /* Tx DMA Request Ctl Reg 1 */ 1031da177e4SLinus Torvalds #define TCR 0x152 /* Tx DMA Critical Request Reg */ 1041da177e4SLinus Torvalds #define RNR 0x154 /* Rx DMA Request Ctl Reg */ 1051da177e4SLinus Torvalds #define RCR 0x156 /* Rx DMA Critical Request Reg */ 1061da177e4SLinus Torvalds 1071da177e4SLinus Torvalds /* Timer Registers */ 1081da177e4SLinus Torvalds #define TIMER0RX_OFFSET 0x00 1091da177e4SLinus Torvalds #define TIMER0TX_OFFSET 0x10 1101da177e4SLinus Torvalds #define TIMER1RX_OFFSET 0x20 1111da177e4SLinus Torvalds #define TIMER1TX_OFFSET 0x30 1121da177e4SLinus Torvalds 1131da177e4SLinus Torvalds #define TCNTL 0x200 /* Timer Upcounter L */ 1141da177e4SLinus Torvalds #define TCNTH 0x201 /* Timer Upcounter H */ 1151da177e4SLinus Torvalds #define TCONRL 0x204 /* Timer Constant Register L */ 1161da177e4SLinus Torvalds #define TCONRH 0x205 /* Timer Constant Register H */ 1171da177e4SLinus Torvalds #define TCSR 0x206 /* Timer Control/Status Register */ 1181da177e4SLinus Torvalds #define TEPR 0x207 /* Timer Expand Prescale Register */ 1191da177e4SLinus Torvalds 1201da177e4SLinus Torvalds /* DMA registers */ 1211da177e4SLinus Torvalds #define PCR 0x40 /* DMA priority control reg */ 1221da177e4SLinus Torvalds #define DRR 0x44 /* DMA reset reg */ 1231da177e4SLinus Torvalds #define DMER 0x07 /* DMA Master Enable reg */ 1241da177e4SLinus Torvalds #define BTCR 0x08 /* Burst Tx Ctl Reg */ 1251da177e4SLinus Torvalds #define BOLR 0x0c /* Back-off Length Reg */ 1261da177e4SLinus Torvalds #define DSR_RX(chan) (0x48 + 2*chan) /* DMA Status Reg (Rx) */ 1271da177e4SLinus Torvalds #define DSR_TX(chan) (0x49 + 2*chan) /* DMA Status Reg (Tx) */ 1281da177e4SLinus Torvalds #define DIR_RX(chan) (0x4c + 2*chan) /* DMA Interrupt Enable Reg (Rx) */ 1291da177e4SLinus Torvalds #define DIR_TX(chan) (0x4d + 2*chan) /* DMA Interrupt Enable Reg (Tx) */ 1301da177e4SLinus Torvalds #define FCT_RX(chan) (0x50 + 2*chan) /* Frame End Interrupt Counter (Rx) */ 1311da177e4SLinus Torvalds #define FCT_TX(chan) (0x51 + 2*chan) /* Frame End Interrupt Counter (Tx) */ 1321da177e4SLinus Torvalds #define DMR_RX(chan) (0x54 + 2*chan) /* DMA Mode Reg (Rx) */ 1331da177e4SLinus Torvalds #define DMR_TX(chan) (0x55 + 2*chan) /* DMA Mode Reg (Tx) */ 1341da177e4SLinus Torvalds #define DCR_RX(chan) (0x58 + 2*chan) /* DMA Command Reg (Rx) */ 1351da177e4SLinus Torvalds #define DCR_TX(chan) (0x59 + 2*chan) /* DMA Command Reg (Tx) */ 1361da177e4SLinus Torvalds 1371da177e4SLinus Torvalds /* DMA Channel Registers */ 1381da177e4SLinus Torvalds #define DMAC0RX_OFFSET 0x00 1391da177e4SLinus Torvalds #define DMAC0TX_OFFSET 0x20 1401da177e4SLinus Torvalds #define DMAC1RX_OFFSET 0x40 1411da177e4SLinus Torvalds #define DMAC1TX_OFFSET 0x60 1421da177e4SLinus Torvalds 1431da177e4SLinus Torvalds #define DARL 0x80 /* Dest Addr Register L (single-block, RX only) */ 1441da177e4SLinus Torvalds #define DARH 0x81 /* Dest Addr Register H (single-block, RX only) */ 1451da177e4SLinus Torvalds #define DARB 0x82 /* Dest Addr Register B (single-block, RX only) */ 1461da177e4SLinus Torvalds #define DARBH 0x83 /* Dest Addr Register BH (single-block, RX only) */ 1471da177e4SLinus Torvalds #define SARL 0x80 /* Source Addr Register L (single-block, TX only) */ 1481da177e4SLinus Torvalds #define SARH 0x81 /* Source Addr Register H (single-block, TX only) */ 1491da177e4SLinus Torvalds #define SARB 0x82 /* Source Addr Register B (single-block, TX only) */ 1501da177e4SLinus Torvalds #define DARBH 0x83 /* Source Addr Register BH (single-block, TX only) */ 1511da177e4SLinus Torvalds #define BARL 0x80 /* Buffer Addr Register L (chained-block) */ 1521da177e4SLinus Torvalds #define BARH 0x81 /* Buffer Addr Register H (chained-block) */ 1531da177e4SLinus Torvalds #define BARB 0x82 /* Buffer Addr Register B (chained-block) */ 1541da177e4SLinus Torvalds #define BARBH 0x83 /* Buffer Addr Register BH (chained-block) */ 1551da177e4SLinus Torvalds #define CDAL 0x84 /* Current Descriptor Addr Register L */ 1561da177e4SLinus Torvalds #define CDAH 0x85 /* Current Descriptor Addr Register H */ 1571da177e4SLinus Torvalds #define CDAB 0x86 /* Current Descriptor Addr Register B */ 1581da177e4SLinus Torvalds #define CDABH 0x87 /* Current Descriptor Addr Register BH */ 1591da177e4SLinus Torvalds #define EDAL 0x88 /* Error Descriptor Addr Register L */ 1601da177e4SLinus Torvalds #define EDAH 0x89 /* Error Descriptor Addr Register H */ 1611da177e4SLinus Torvalds #define EDAB 0x8a /* Error Descriptor Addr Register B */ 1621da177e4SLinus Torvalds #define EDABH 0x8b /* Error Descriptor Addr Register BH */ 1631da177e4SLinus Torvalds #define BFLL 0x90 /* RX Buffer Length L (only RX) */ 1641da177e4SLinus Torvalds #define BFLH 0x91 /* RX Buffer Length H (only RX) */ 1651da177e4SLinus Torvalds #define BCRL 0x8c /* Byte Count Register L */ 1661da177e4SLinus Torvalds #define BCRH 0x8d /* Byte Count Register H */ 1671da177e4SLinus Torvalds 1681da177e4SLinus Torvalds /* Block Descriptor Structure */ 1691da177e4SLinus Torvalds typedef struct { 1701da177e4SLinus Torvalds unsigned long next; /* pointer to next block descriptor */ 1711da177e4SLinus Torvalds unsigned long ptbuf; /* buffer pointer */ 1721da177e4SLinus Torvalds unsigned short len; /* data length */ 1731da177e4SLinus Torvalds unsigned char status; /* status */ 1741da177e4SLinus Torvalds unsigned char filler[5]; /* alignment filler (16 bytes) */ 1751da177e4SLinus Torvalds } pcsca_bd_t; 1761da177e4SLinus Torvalds 1771da177e4SLinus Torvalds /* Block Descriptor Structure */ 1781da177e4SLinus Torvalds typedef struct { 1791da177e4SLinus Torvalds u32 cp; /* pointer to next block descriptor */ 1801da177e4SLinus Torvalds u32 bp; /* buffer pointer */ 1811da177e4SLinus Torvalds u16 len; /* data length */ 1821da177e4SLinus Torvalds u8 stat; /* status */ 1831da177e4SLinus Torvalds u8 unused; /* pads to 4-byte boundary */ 1841da177e4SLinus Torvalds }pkt_desc; 1851da177e4SLinus Torvalds 1861da177e4SLinus Torvalds 1871da177e4SLinus Torvalds /* 1881da177e4SLinus Torvalds Descriptor Status definitions: 1891da177e4SLinus Torvalds 1901da177e4SLinus Torvalds Bit Transmission Reception 1911da177e4SLinus Torvalds 1921da177e4SLinus Torvalds 7 EOM EOM 1931da177e4SLinus Torvalds 6 - Short Frame 1941da177e4SLinus Torvalds 5 - Abort 1951da177e4SLinus Torvalds 4 - Residual bit 1961da177e4SLinus Torvalds 3 Underrun Overrun 1971da177e4SLinus Torvalds 2 - CRC 1981da177e4SLinus Torvalds 1 Ownership Ownership 1991da177e4SLinus Torvalds 0 EOT - 2001da177e4SLinus Torvalds */ 2011da177e4SLinus Torvalds #define DST_EOT 0x01 /* End of transmit command */ 2021da177e4SLinus Torvalds #define DST_OSB 0x02 /* Ownership bit */ 2031da177e4SLinus Torvalds #define DST_CRC 0x04 /* CRC Error */ 2041da177e4SLinus Torvalds #define DST_OVR 0x08 /* Overrun */ 2051da177e4SLinus Torvalds #define DST_UDR 0x08 /* Underrun */ 2061da177e4SLinus Torvalds #define DST_RBIT 0x10 /* Residual bit */ 2071da177e4SLinus Torvalds #define DST_ABT 0x20 /* Abort */ 2081da177e4SLinus Torvalds #define DST_SHRT 0x40 /* Short Frame */ 2091da177e4SLinus Torvalds #define DST_EOM 0x80 /* End of Message */ 2101da177e4SLinus Torvalds 2111da177e4SLinus Torvalds /* Packet Descriptor Status bits */ 2121da177e4SLinus Torvalds 2131da177e4SLinus Torvalds #define ST_TX_EOM 0x80 /* End of frame */ 2141da177e4SLinus Torvalds #define ST_TX_UNDRRUN 0x08 2151da177e4SLinus Torvalds #define ST_TX_OWNRSHP 0x02 21688bfe6eaSGeert Uytterhoeven #define ST_TX_EOT 0x01 /* End of transmission */ 2171da177e4SLinus Torvalds 2181da177e4SLinus Torvalds #define ST_RX_EOM 0x80 /* End of frame */ 2191da177e4SLinus Torvalds #define ST_RX_SHORT 0x40 /* Short frame */ 2201da177e4SLinus Torvalds #define ST_RX_ABORT 0x20 /* Abort */ 2211da177e4SLinus Torvalds #define ST_RX_RESBIT 0x10 /* Residual bit */ 2221da177e4SLinus Torvalds #define ST_RX_OVERRUN 0x08 /* Overrun */ 2231da177e4SLinus Torvalds #define ST_RX_CRC 0x04 /* CRC */ 2241da177e4SLinus Torvalds #define ST_RX_OWNRSHP 0x02 2251da177e4SLinus Torvalds 2261da177e4SLinus Torvalds #define ST_ERROR_MASK 0x7C 2271da177e4SLinus Torvalds 2281da177e4SLinus Torvalds /* Status Counter Registers */ 2291da177e4SLinus Torvalds #define CMCR 0x158 /* Counter Master Ctl Reg */ 2301da177e4SLinus Torvalds #define TECNTL 0x160 /* Tx EOM Counter L */ 2311da177e4SLinus Torvalds #define TECNTM 0x161 /* Tx EOM Counter M */ 2321da177e4SLinus Torvalds #define TECNTH 0x162 /* Tx EOM Counter H */ 2331da177e4SLinus Torvalds #define TECCR 0x163 /* Tx EOM Counter Ctl Reg */ 2341da177e4SLinus Torvalds #define URCNTL 0x164 /* Underrun Counter L */ 2351da177e4SLinus Torvalds #define URCNTH 0x165 /* Underrun Counter H */ 2361da177e4SLinus Torvalds #define URCCR 0x167 /* Underrun Counter Ctl Reg */ 2371da177e4SLinus Torvalds #define RECNTL 0x168 /* Rx EOM Counter L */ 2381da177e4SLinus Torvalds #define RECNTM 0x169 /* Rx EOM Counter M */ 2391da177e4SLinus Torvalds #define RECNTH 0x16a /* Rx EOM Counter H */ 2401da177e4SLinus Torvalds #define RECCR 0x16b /* Rx EOM Counter Ctl Reg */ 2411da177e4SLinus Torvalds #define ORCNTL 0x16c /* Overrun Counter L */ 2421da177e4SLinus Torvalds #define ORCNTH 0x16d /* Overrun Counter H */ 2431da177e4SLinus Torvalds #define ORCCR 0x16f /* Overrun Counter Ctl Reg */ 2441da177e4SLinus Torvalds #define CECNTL 0x170 /* CRC Counter L */ 2451da177e4SLinus Torvalds #define CECNTH 0x171 /* CRC Counter H */ 2461da177e4SLinus Torvalds #define CECCR 0x173 /* CRC Counter Ctl Reg */ 2471da177e4SLinus Torvalds #define ABCNTL 0x174 /* Abort frame Counter L */ 2481da177e4SLinus Torvalds #define ABCNTH 0x175 /* Abort frame Counter H */ 2491da177e4SLinus Torvalds #define ABCCR 0x177 /* Abort frame Counter Ctl Reg */ 2501da177e4SLinus Torvalds #define SHCNTL 0x178 /* Short frame Counter L */ 2511da177e4SLinus Torvalds #define SHCNTH 0x179 /* Short frame Counter H */ 2521da177e4SLinus Torvalds #define SHCCR 0x17b /* Short frame Counter Ctl Reg */ 2531da177e4SLinus Torvalds #define RSCNTL 0x17c /* Residual bit Counter L */ 2541da177e4SLinus Torvalds #define RSCNTH 0x17d /* Residual bit Counter H */ 2551da177e4SLinus Torvalds #define RSCCR 0x17f /* Residual bit Counter Ctl Reg */ 2561da177e4SLinus Torvalds 2571da177e4SLinus Torvalds /* Register Programming Constants */ 2581da177e4SLinus Torvalds 2591da177e4SLinus Torvalds #define IR0_DMIC 0x00000001 2601da177e4SLinus Torvalds #define IR0_DMIB 0x00000002 2611da177e4SLinus Torvalds #define IR0_DMIA 0x00000004 2621da177e4SLinus Torvalds #define IR0_EFT 0x00000008 2631da177e4SLinus Torvalds #define IR0_DMAREQ 0x00010000 2641da177e4SLinus Torvalds #define IR0_TXINT 0x00020000 2651da177e4SLinus Torvalds #define IR0_RXINTB 0x00040000 2661da177e4SLinus Torvalds #define IR0_RXINTA 0x00080000 2671da177e4SLinus Torvalds #define IR0_TXRDY 0x00100000 2681da177e4SLinus Torvalds #define IR0_RXRDY 0x00200000 2691da177e4SLinus Torvalds 2701da177e4SLinus Torvalds #define MD0_CRC16_0 0x00 2711da177e4SLinus Torvalds #define MD0_CRC16_1 0x01 2721da177e4SLinus Torvalds #define MD0_CRC32 0x02 2731da177e4SLinus Torvalds #define MD0_CRC_CCITT 0x03 2741da177e4SLinus Torvalds #define MD0_CRCC0 0x04 2751da177e4SLinus Torvalds #define MD0_CRCC1 0x08 2761da177e4SLinus Torvalds #define MD0_AUTO_ENA 0x10 2771da177e4SLinus Torvalds #define MD0_ASYNC 0x00 2781da177e4SLinus Torvalds #define MD0_BY_MSYNC 0x20 2791da177e4SLinus Torvalds #define MD0_BY_BISYNC 0x40 2801da177e4SLinus Torvalds #define MD0_BY_EXT 0x60 2811da177e4SLinus Torvalds #define MD0_BIT_SYNC 0x80 2821da177e4SLinus Torvalds #define MD0_TRANSP 0xc0 2831da177e4SLinus Torvalds 2841da177e4SLinus Torvalds #define MD0_HDLC 0x80 /* Bit-sync HDLC mode */ 2851da177e4SLinus Torvalds 2861da177e4SLinus Torvalds #define MD0_CRC_NONE 0x00 2871da177e4SLinus Torvalds #define MD0_CRC_16_0 0x04 2881da177e4SLinus Torvalds #define MD0_CRC_16 0x05 2891da177e4SLinus Torvalds #define MD0_CRC_ITU32 0x06 2901da177e4SLinus Torvalds #define MD0_CRC_ITU 0x07 2911da177e4SLinus Torvalds 2921da177e4SLinus Torvalds #define MD1_NOADDR 0x00 2931da177e4SLinus Torvalds #define MD1_SADDR1 0x40 2941da177e4SLinus Torvalds #define MD1_SADDR2 0x80 2951da177e4SLinus Torvalds #define MD1_DADDR 0xc0 2961da177e4SLinus Torvalds 2971da177e4SLinus Torvalds #define MD2_NRZI_IEEE 0x40 2981da177e4SLinus Torvalds #define MD2_MANCHESTER 0x80 2991da177e4SLinus Torvalds #define MD2_FM_MARK 0xA0 3001da177e4SLinus Torvalds #define MD2_FM_SPACE 0xC0 3011da177e4SLinus Torvalds #define MD2_LOOPBACK 0x03 /* Local data Loopback */ 3021da177e4SLinus Torvalds 3031da177e4SLinus Torvalds #define MD2_F_DUPLEX 0x00 3041da177e4SLinus Torvalds #define MD2_AUTO_ECHO 0x01 3051da177e4SLinus Torvalds #define MD2_LOOP_HI_Z 0x02 3061da177e4SLinus Torvalds #define MD2_LOOP_MIR 0x03 3071da177e4SLinus Torvalds #define MD2_ADPLL_X8 0x00 3081da177e4SLinus Torvalds #define MD2_ADPLL_X16 0x08 3091da177e4SLinus Torvalds #define MD2_ADPLL_X32 0x10 3101da177e4SLinus Torvalds #define MD2_NRZ 0x00 3111da177e4SLinus Torvalds #define MD2_NRZI 0x20 3121da177e4SLinus Torvalds #define MD2_NRZ_IEEE 0x40 3131da177e4SLinus Torvalds #define MD2_MANCH 0x00 3141da177e4SLinus Torvalds #define MD2_FM1 0x20 3151da177e4SLinus Torvalds #define MD2_FM0 0x40 3161da177e4SLinus Torvalds #define MD2_FM 0x80 3171da177e4SLinus Torvalds 3181da177e4SLinus Torvalds #define CTL_RTS 0x01 3191da177e4SLinus Torvalds #define CTL_DTR 0x02 3201da177e4SLinus Torvalds #define CTL_SYN 0x04 3211da177e4SLinus Torvalds #define CTL_IDLC 0x10 3221da177e4SLinus Torvalds #define CTL_UDRNC 0x20 3231da177e4SLinus Torvalds #define CTL_URSKP 0x40 3241da177e4SLinus Torvalds #define CTL_URCT 0x80 3251da177e4SLinus Torvalds 3261da177e4SLinus Torvalds #define CTL_NORTS 0x01 3271da177e4SLinus Torvalds #define CTL_NODTR 0x02 3281da177e4SLinus Torvalds #define CTL_IDLE 0x10 3291da177e4SLinus Torvalds 3301da177e4SLinus Torvalds #define RXS_BR0 0x01 3311da177e4SLinus Torvalds #define RXS_BR1 0x02 3321da177e4SLinus Torvalds #define RXS_BR2 0x04 3331da177e4SLinus Torvalds #define RXS_BR3 0x08 3341da177e4SLinus Torvalds #define RXS_ECLK 0x00 3351da177e4SLinus Torvalds #define RXS_ECLK_NS 0x20 3361da177e4SLinus Torvalds #define RXS_IBRG 0x40 3371da177e4SLinus Torvalds #define RXS_PLL1 0x50 3381da177e4SLinus Torvalds #define RXS_PLL2 0x60 3391da177e4SLinus Torvalds #define RXS_PLL3 0x70 3401da177e4SLinus Torvalds #define RXS_DRTXC 0x80 3411da177e4SLinus Torvalds 3421da177e4SLinus Torvalds #define TXS_BR0 0x01 3431da177e4SLinus Torvalds #define TXS_BR1 0x02 3441da177e4SLinus Torvalds #define TXS_BR2 0x04 3451da177e4SLinus Torvalds #define TXS_BR3 0x08 3461da177e4SLinus Torvalds #define TXS_ECLK 0x00 3471da177e4SLinus Torvalds #define TXS_IBRG 0x40 3481da177e4SLinus Torvalds #define TXS_RCLK 0x60 3491da177e4SLinus Torvalds #define TXS_DTRXC 0x80 3501da177e4SLinus Torvalds 3511da177e4SLinus Torvalds #define EXS_RES0 0x01 3521da177e4SLinus Torvalds #define EXS_RES1 0x02 3531da177e4SLinus Torvalds #define EXS_RES2 0x04 3541da177e4SLinus Torvalds #define EXS_TES0 0x10 3551da177e4SLinus Torvalds #define EXS_TES1 0x20 3561da177e4SLinus Torvalds #define EXS_TES2 0x40 3571da177e4SLinus Torvalds 3581da177e4SLinus Torvalds #define CLK_BRG_MASK 0x0F 3591da177e4SLinus Torvalds #define CLK_PIN_OUT 0x80 3601da177e4SLinus Torvalds #define CLK_LINE 0x00 /* clock line input */ 3611da177e4SLinus Torvalds #define CLK_BRG 0x40 /* internal baud rate generator */ 3621da177e4SLinus Torvalds #define CLK_TX_RXCLK 0x60 /* TX clock from RX clock */ 3631da177e4SLinus Torvalds 3641da177e4SLinus Torvalds #define CMD_RX_RST 0x11 3651da177e4SLinus Torvalds #define CMD_RX_ENA 0x12 3661da177e4SLinus Torvalds #define CMD_RX_DIS 0x13 3671da177e4SLinus Torvalds #define CMD_RX_CRC_INIT 0x14 3681da177e4SLinus Torvalds #define CMD_RX_MSG_REJ 0x15 3691da177e4SLinus Torvalds #define CMD_RX_MP_SRCH 0x16 3701da177e4SLinus Torvalds #define CMD_RX_CRC_EXC 0x17 3711da177e4SLinus Torvalds #define CMD_RX_CRC_FRC 0x18 3721da177e4SLinus Torvalds #define CMD_TX_RST 0x01 3731da177e4SLinus Torvalds #define CMD_TX_ENA 0x02 3741da177e4SLinus Torvalds #define CMD_TX_DISA 0x03 3751da177e4SLinus Torvalds #define CMD_TX_CRC_INIT 0x04 3761da177e4SLinus Torvalds #define CMD_TX_CRC_EXC 0x05 3771da177e4SLinus Torvalds #define CMD_TX_EOM 0x06 3781da177e4SLinus Torvalds #define CMD_TX_ABORT 0x07 3791da177e4SLinus Torvalds #define CMD_TX_MP_ON 0x08 3801da177e4SLinus Torvalds #define CMD_TX_BUF_CLR 0x09 3811da177e4SLinus Torvalds #define CMD_TX_DISB 0x0b 3821da177e4SLinus Torvalds #define CMD_CH_RST 0x21 3831da177e4SLinus Torvalds #define CMD_SRCH_MODE 0x31 3841da177e4SLinus Torvalds #define CMD_NOP 0x00 3851da177e4SLinus Torvalds 3861da177e4SLinus Torvalds #define CMD_RESET 0x21 3871da177e4SLinus Torvalds #define CMD_TX_ENABLE 0x02 3881da177e4SLinus Torvalds #define CMD_RX_ENABLE 0x12 3891da177e4SLinus Torvalds 3901da177e4SLinus Torvalds #define ST0_RXRDY 0x01 3911da177e4SLinus Torvalds #define ST0_TXRDY 0x02 3921da177e4SLinus Torvalds #define ST0_RXINTB 0x20 3931da177e4SLinus Torvalds #define ST0_RXINTA 0x40 3941da177e4SLinus Torvalds #define ST0_TXINT 0x80 3951da177e4SLinus Torvalds 3961da177e4SLinus Torvalds #define ST1_IDLE 0x01 3971da177e4SLinus Torvalds #define ST1_ABORT 0x02 3981da177e4SLinus Torvalds #define ST1_CDCD 0x04 3991da177e4SLinus Torvalds #define ST1_CCTS 0x08 4001da177e4SLinus Torvalds #define ST1_SYN_FLAG 0x10 4011da177e4SLinus Torvalds #define ST1_CLMD 0x20 4021da177e4SLinus Torvalds #define ST1_TXIDLE 0x40 4031da177e4SLinus Torvalds #define ST1_UDRN 0x80 4041da177e4SLinus Torvalds 4051da177e4SLinus Torvalds #define ST2_CRCE 0x04 4061da177e4SLinus Torvalds #define ST2_ONRN 0x08 4071da177e4SLinus Torvalds #define ST2_RBIT 0x10 4081da177e4SLinus Torvalds #define ST2_ABORT 0x20 4091da177e4SLinus Torvalds #define ST2_SHORT 0x40 4101da177e4SLinus Torvalds #define ST2_EOM 0x80 4111da177e4SLinus Torvalds 4121da177e4SLinus Torvalds #define ST3_RX_ENA 0x01 4131da177e4SLinus Torvalds #define ST3_TX_ENA 0x02 4141da177e4SLinus Torvalds #define ST3_DCD 0x04 4151da177e4SLinus Torvalds #define ST3_CTS 0x08 4161da177e4SLinus Torvalds #define ST3_SRCH_MODE 0x10 4171da177e4SLinus Torvalds #define ST3_SLOOP 0x20 4181da177e4SLinus Torvalds #define ST3_GPI 0x80 4191da177e4SLinus Torvalds 4201da177e4SLinus Torvalds #define ST4_RDNR 0x01 4211da177e4SLinus Torvalds #define ST4_RDCR 0x02 4221da177e4SLinus Torvalds #define ST4_TDNR 0x04 4231da177e4SLinus Torvalds #define ST4_TDCR 0x08 4241da177e4SLinus Torvalds #define ST4_OCLM 0x20 4251da177e4SLinus Torvalds #define ST4_CFT 0x40 4261da177e4SLinus Torvalds #define ST4_CGPI 0x80 4271da177e4SLinus Torvalds 4281da177e4SLinus Torvalds #define FST_CRCEF 0x04 4291da177e4SLinus Torvalds #define FST_OVRNF 0x08 4301da177e4SLinus Torvalds #define FST_RBIF 0x10 4311da177e4SLinus Torvalds #define FST_ABTF 0x20 4321da177e4SLinus Torvalds #define FST_SHRTF 0x40 4331da177e4SLinus Torvalds #define FST_EOMF 0x80 4341da177e4SLinus Torvalds 4351da177e4SLinus Torvalds #define IE0_RXRDY 0x01 4361da177e4SLinus Torvalds #define IE0_TXRDY 0x02 4371da177e4SLinus Torvalds #define IE0_RXINTB 0x20 4381da177e4SLinus Torvalds #define IE0_RXINTA 0x40 4391da177e4SLinus Torvalds #define IE0_TXINT 0x80 4401da177e4SLinus Torvalds #define IE0_UDRN 0x00008000 /* TX underrun MSCI interrupt enable */ 4411da177e4SLinus Torvalds #define IE0_CDCD 0x00000400 /* CD level change interrupt enable */ 4421da177e4SLinus Torvalds 4431da177e4SLinus Torvalds #define IE1_IDLD 0x01 4441da177e4SLinus Torvalds #define IE1_ABTD 0x02 4451da177e4SLinus Torvalds #define IE1_CDCD 0x04 4461da177e4SLinus Torvalds #define IE1_CCTS 0x08 4471da177e4SLinus Torvalds #define IE1_SYNCD 0x10 4481da177e4SLinus Torvalds #define IE1_CLMD 0x20 4491da177e4SLinus Torvalds #define IE1_IDL 0x40 4501da177e4SLinus Torvalds #define IE1_UDRN 0x80 4511da177e4SLinus Torvalds 4521da177e4SLinus Torvalds #define IE2_CRCE 0x04 4531da177e4SLinus Torvalds #define IE2_OVRN 0x08 4541da177e4SLinus Torvalds #define IE2_RBIT 0x10 4551da177e4SLinus Torvalds #define IE2_ABT 0x20 4561da177e4SLinus Torvalds #define IE2_SHRT 0x40 4571da177e4SLinus Torvalds #define IE2_EOM 0x80 4581da177e4SLinus Torvalds 4591da177e4SLinus Torvalds #define IE4_RDNR 0x01 4601da177e4SLinus Torvalds #define IE4_RDCR 0x02 4611da177e4SLinus Torvalds #define IE4_TDNR 0x04 4621da177e4SLinus Torvalds #define IE4_TDCR 0x08 4631da177e4SLinus Torvalds #define IE4_OCLM 0x20 4641da177e4SLinus Torvalds #define IE4_CFT 0x40 4651da177e4SLinus Torvalds #define IE4_CGPI 0x80 4661da177e4SLinus Torvalds 4671da177e4SLinus Torvalds #define FIE_CRCEF 0x04 4681da177e4SLinus Torvalds #define FIE_OVRNF 0x08 4691da177e4SLinus Torvalds #define FIE_RBIF 0x10 4701da177e4SLinus Torvalds #define FIE_ABTF 0x20 4711da177e4SLinus Torvalds #define FIE_SHRTF 0x40 4721da177e4SLinus Torvalds #define FIE_EOMF 0x80 4731da177e4SLinus Torvalds 4741da177e4SLinus Torvalds #define DSR_DWE 0x01 4751da177e4SLinus Torvalds #define DSR_DE 0x02 4761da177e4SLinus Torvalds #define DSR_REF 0x04 4771da177e4SLinus Torvalds #define DSR_UDRF 0x04 4781da177e4SLinus Torvalds #define DSR_COA 0x08 4791da177e4SLinus Torvalds #define DSR_COF 0x10 4801da177e4SLinus Torvalds #define DSR_BOF 0x20 4811da177e4SLinus Torvalds #define DSR_EOM 0x40 4821da177e4SLinus Torvalds #define DSR_EOT 0x80 4831da177e4SLinus Torvalds 4841da177e4SLinus Torvalds #define DIR_REF 0x04 4851da177e4SLinus Torvalds #define DIR_UDRF 0x04 4861da177e4SLinus Torvalds #define DIR_COA 0x08 4871da177e4SLinus Torvalds #define DIR_COF 0x10 4881da177e4SLinus Torvalds #define DIR_BOF 0x20 4891da177e4SLinus Torvalds #define DIR_EOM 0x40 4901da177e4SLinus Torvalds #define DIR_EOT 0x80 4911da177e4SLinus Torvalds 4921da177e4SLinus Torvalds #define DIR_REFE 0x04 4931da177e4SLinus Torvalds #define DIR_UDRFE 0x04 4941da177e4SLinus Torvalds #define DIR_COAE 0x08 4951da177e4SLinus Torvalds #define DIR_COFE 0x10 4961da177e4SLinus Torvalds #define DIR_BOFE 0x20 4971da177e4SLinus Torvalds #define DIR_EOME 0x40 4981da177e4SLinus Torvalds #define DIR_EOTE 0x80 4991da177e4SLinus Torvalds 5001da177e4SLinus Torvalds #define DMR_CNTE 0x02 5011da177e4SLinus Torvalds #define DMR_NF 0x04 5021da177e4SLinus Torvalds #define DMR_SEOME 0x08 5031da177e4SLinus Torvalds #define DMR_TMOD 0x10 5041da177e4SLinus Torvalds 5051da177e4SLinus Torvalds #define DMER_DME 0x80 /* DMA Master Enable */ 5061da177e4SLinus Torvalds 5071da177e4SLinus Torvalds #define DCR_SW_ABT 0x01 5081da177e4SLinus Torvalds #define DCR_FCT_CLR 0x02 5091da177e4SLinus Torvalds 5101da177e4SLinus Torvalds #define DCR_ABORT 0x01 5111da177e4SLinus Torvalds #define DCR_CLEAR_EOF 0x02 5121da177e4SLinus Torvalds 5131da177e4SLinus Torvalds #define PCR_COTE 0x80 5141da177e4SLinus Torvalds #define PCR_PR0 0x01 5151da177e4SLinus Torvalds #define PCR_PR1 0x02 5161da177e4SLinus Torvalds #define PCR_PR2 0x04 5171da177e4SLinus Torvalds #define PCR_CCC 0x08 5181da177e4SLinus Torvalds #define PCR_BRC 0x10 5191da177e4SLinus Torvalds #define PCR_OSB 0x40 5201da177e4SLinus Torvalds #define PCR_BURST 0x80 5211da177e4SLinus Torvalds 5221da177e4SLinus Torvalds #endif /* (__HD64572_H) */ 523