Go to the documentation of this file.
102 #include <linux/hdlc.h>
106 #define PC300_PROTO_MLPPP 1
108 #define PC300_MAXCHAN 2
110 #define PC300_RAMSIZE 0x40000
111 #define PC300_FALCSIZE 0x400
113 #define PC300_OSC_CLOCK 24576000
114 #define PC300_PCI_CLOCK 33000000
116 #define BD_DEF_LEN 0x0800
117 #define DMA_TX_MEMSZ 0x8000
118 #define DMA_RX_MEMSZ 0x10000
120 #define N_DMA_TX_BUF (DMA_TX_MEMSZ / BD_DEF_LEN)
121 #define N_DMA_RX_BUF (DMA_RX_MEMSZ / BD_DEF_LEN)
124 #define DMA_TX_BASE ((N_DMA_TX_BUF + N_DMA_RX_BUF) * \
125 PC300_MAXCHAN * sizeof(pcsca_bd_t))
126 #define DMA_RX_BASE (DMA_TX_BASE + PC300_MAXCHAN*DMA_TX_MEMSZ)
129 #define DMA_TX_BD_BASE 0x0000
130 #define DMA_RX_BD_BASE (DMA_TX_BD_BASE + ((PC300_MAXCHAN*DMA_TX_MEMSZ / \
131 BD_DEF_LEN) * sizeof(pcsca_bd_t)))
134 #define TX_BD_ADDR(chan, n) (DMA_TX_BD_BASE + \
135 ((N_DMA_TX_BUF*chan) + n) * sizeof(pcsca_bd_t))
136 #define RX_BD_ADDR(chan, n) (DMA_RX_BD_BASE + \
137 ((N_DMA_RX_BUF*chan) + n) * sizeof(pcsca_bd_t))
140 #define F_REG(reg, chan) (0x200*(chan) + ((reg)<<2))
146 #define cpc_writeb(port,val) {writeb((u8)(val),(port)); mb();}
147 #define cpc_writew(port,val) {writew((ushort)(val),(port)); mb();}
148 #define cpc_writel(port,val) {writel((u32)(val),(port)); mb();}
150 #define cpc_readb(port) readb(port)
151 #define cpc_readw(port) readw(port)
152 #define cpc_readl(port) readl(port)
173 #define PLX_9050_LINT1_ENABLE 0x01
174 #define PLX_9050_LINT1_POL 0x02
175 #define PLX_9050_LINT1_STATUS 0x04
176 #define PLX_9050_LINT2_ENABLE 0x08
177 #define PLX_9050_LINT2_POL 0x10
178 #define PLX_9050_LINT2_STATUS 0x20
179 #define PLX_9050_INTR_ENABLE 0x40
180 #define PLX_9050_SW_INTR 0x80
183 #define PC300_CLKSEL_MASK (0x00000004UL)
184 #define PC300_CHMEDIA_MASK(chan) (0x00000020UL<<(chan*3))
185 #define PC300_CTYPE_MASK (0x00000800UL)
189 #define CPLD_REG1 0x140
190 #define CPLD_REG2 0x144
192 #define CPLD_V2_REG1 0x100
193 #define CPLD_V2_REG2 0x104
194 #define CPLD_ID_REG 0x108
199 #define CPLD_REG1_FALC_RESET 0x01
200 #define CPLD_REG1_SCA_RESET 0x02
201 #define CPLD_REG1_GLOBAL_CLK 0x08
202 #define CPLD_REG1_FALC_DCD 0x10
203 #define CPLD_REG1_FALC_CTS 0x20
205 #define CPLD_REG2_FALC_TX_CLK 0x01
206 #define CPLD_REG2_FALC_RX_CLK 0x02
207 #define CPLD_REG2_FALC_LED1 0x10
208 #define CPLD_REG2_FALC_LED2 0x20
211 #define PC300_FALC_MAXLOOP 0x0000ffff
301 #ifdef CONFIG_PC300_MLPPP
374 #define N_SPPP_IOCTLS 2
399 #define PC300_RSV 0x01
400 #define PC300_X21 0x02
401 #define PC300_TE 0x03
403 #define PC300_PCI 0x00
404 #define PC300_PMC 0x01
406 #define PC300_LC_AMI 0x01
407 #define PC300_LC_B8ZS 0x02
408 #define PC300_LC_NRZ 0x03
409 #define PC300_LC_HDB3 0x04
412 #define PC300_FR_ESF 0x01
413 #define PC300_FR_D4 0x02
414 #define PC300_FR_ESF_JAPAN 0x03
417 #define PC300_FR_MF_CRC4 0x04
418 #define PC300_FR_MF_NON_CRC4 0x05
419 #define PC300_FR_UNFRAMED 0x06
421 #define PC300_LBO_0_DB 0x00
422 #define PC300_LBO_7_5_DB 0x01
423 #define PC300_LBO_15_DB 0x02
424 #define PC300_LBO_22_5_DB 0x03
426 #define PC300_RX_SENS_SH 0x01
427 #define PC300_RX_SENS_LH 0x02
429 #define PC300_TX_TIMEOUT (2*HZ)
430 #define PC300_TX_QUEUE_LEN 100
431 #define PC300_DEF_MTU 1600